{{-- Breadcrumb --}}
{{ __('Channels') }} / {{ __('Email') }}
{{-- ════════════════════════════════════════════════════ Header ════════════════════════════════════════════════════ --}}
{{ __('Email') }} {{ __('Connect your support inbox. Inbound mail lands in your tickets and outbound replies go out under each store\'s address.') }}
@can('manageStores', $this->resolveCurrentAccountForView()) {{ $showDisabled ? __('Hide disabled') : __('Show disabled') }} {{-- Connect Google Workspace is the primary CTA. The single-CTA direction means the legacy "New email address" modal is no longer in the customer-facing UI. The underlying openNewAddressForm() Livewire method is retained on the component for tests + future "manual platform-default address" escape-hatch paths. --}} @if ($this->googleConfigured) {{ __('Connect Google Workspace') }} @else {{ __('Google connection not configured yet') }} @endif @endcan
{{-- ════════════════════════════════════════════════════ "Connect your support inbox" hero ════════════════════════════════════════════════════ Gmail-first onboarding. The Connect Google Workspace button is now wired to the real OAuth flow — operators consent on Google's screen and come back to a fully configured + verified EmailAddress. --}}

{{ __('Connect your support inbox') }}

{{ __('Use your existing Google Workspace mailbox as your support inbox — your team keeps the inbox they know, ClearDesk handles routing, replies, and automation.') }}

@if ($this->googleConfigured) {{ __('Connect Google Workspace') }} @else @can('manageStores', $this->resolveCurrentAccountForView())
{{ __('Google connection not configured yet. Ask your platform administrator to set the Google OAuth client credentials.') }}
@endcan @endif

{{ __('The OAuth flow connects your mailbox and verifies it automatically. Sending through Google directly is shipping next; today\'s outbound continues to use ClearDesk\'s default delivery.') }}

{{-- ════════════════════════════════════════════════════ Address list ════════════════════════════════════════════════════ --}} @php $rows = $this->addresses; @endphp @if ($rows->isEmpty())
{{ __('No email addresses yet') }}

{{ __('Add your first address using the button above to start receiving customer email.') }}

@else @endif {{-- ════════════════════════════════════════════════════ Recent inbound activity feed ════════════════════════════════════════════════════ --}} @php $activity = $this->recentInboundActivity; @endphp

{{ __('Recent inbound activity') }}

@if ($activity->isEmpty())
{{ __('No inbound email yet. Once a customer emails one of your linked addresses, it will appear here.') }}
@else @endif
{{-- Postmark and other platform-level outbound fallback providers are configured under Super Admin → Platform settings, not on this customer-facing page. The provider-agnostic UX rule: tenants never see the transport implementation — only the canonical inbox identity (email_addresses) and the connected workspace provider (Gmail today, others later). --}} {{-- ════════════════════════════════════════════════════ Create / Edit modal ════════════════════════════════════════════════════ --}} @if ($formOpen)

{{ $editingAddressId !== null ? __('Edit email address') : __('New email address') }}

@error('formAddress')

{{ $message }}

@enderror

{{ __('Used as the From-name on outbound replies. Falls back to the platform default if blank.') }}

@error('formDisplayName')

{{ $message }}

@enderror
{{-- Transport dropdown removed per the provider-agnostic UX direction. The address's transport is now resolved server-side by TransportRegistry — Gmail (when Workspace is connected and the domain matches) else the platform default. The form's `formTransport` property still exists and defaults to `postmark` for backwards compat with the model + existing tests. --}}

{{ __('Disabled addresses are rejected by the inbound router (returns "unknown recipient").') }}

{{ __('Linked stores') }}

{{ __('Select the stores this address routes inbound to. You can mark one as the default sender after saving.') }}

@if ($this->availableStores->isEmpty())
{{ __('This account has no stores yet.') }}
@else
    @foreach ($this->availableStores as $store)
  • @endforeach
@endif
{{ __('Cancel') }} {{ $editingAddressId !== null ? __('Save changes') : __('Create address') }}
@endif