{{ __('Macros') }}

{{ __('Reusable canned replies your team can apply from the inbox composer. Workspace-visible to every member; authoring is restricted to owner / admin.') }}

@php $canManage = $this->canManage(); @endphp @if ($canManage) {{ __('New macro') }} @endif
@php $macros = $this->macros(); @endphp @if (collect($macros)->isEmpty())
{{ __('No macros yet.') }} @if ($canManage)
{{ __('Create the first one') }}
@endif
@else
@foreach ($macros as $macro) {{-- Suggested action column. Macros without an attached action render an em-dash so the column reads consistently; macros with an attached action render a chip with its label + prefill summary. Stub actions (Royal Mail return label today) get an amber "Coming soon" badge so the operator can see at a glance which rows will block when applied. --}} @endforeach
{{ __('Name') }} {{ __('Scope') }} {{ __('Suggested action') }} {{ __('Usage') }}
{{ $macro->name }}
@if ($macro->shortcut)
/{{ $macro->shortcut }}
@endif
@if ($macro->isGlobal()) {{ __('Global') }} @else {{ $macro->store?->name ?? __('Store') }} @endif @php $action = $macro->primaryAction(); @endphp @if ($action === null) @else @php $summary = $action->prefillSummary(); $isStub = $action->isStubType(); @endphp
{{ $action->actionTypeLabel() }} @if ($isStub) {{ __('Coming soon') }} @endif
@if ($summary !== '')
{{ $summary }}
@endif
@endif
{{ trans_choice('{0} unused|{1} :count use|[2,*] :count uses', $macro->usage_count, ['count' => $macro->usage_count]) }}
@if ($macro->last_used_at)
{{ $macro->last_used_at->diffForHumans() }}
@endif
@if ($canManage)
@if ($confirmingDeleteId === $macro->id) {{ __('Cancel') }} {{ __('Delete macro') }} @else {{ __('Edit') }} {{ __('Delete') }} @endif
@else {{ __('Read-only') }} @endif
@endif