@if ($canManage) {{ __('New rule') }} @endif
@foreach ($metrics as $m)

{{ $m['label'] }}

{{ number_format($m['value']) }}

{{ $m['sub'] }}
@endforeach
@php $tabMeta = [ 'all' => ['label' => __('All'), 'icon' => 'queue-list'], 'active' => ['label' => __('On'), 'icon' => 'bolt'], 'paused' => ['label' => __('Paused'), 'icon' => 'clock'], 'draft' => ['label' => __('Draft'), 'icon' => 'document-text'], ]; $statusColor = ['draft' => 'slate', 'active' => 'emerald', 'paused' => 'amber']; @endphp
@foreach ($tabMeta as $key => $meta) @endforeach

{{ __('Rules') }}

{{ __('Ready-made scenarios start switched off. Open one to test it, adjust it, then switch it on.') }}

@forelse ($rules as $rule) @empty @endforelse
{{ __('Rule') }} {{ __('When') }} {{ __('Status') }} {{ __('Last test') }} {{ __('Daily cap') }}
{{ $rule->name }} @if ($rule->description)

{{ $rule->description }}

@endif
{{ \App\Services\Crm\Automation\Catalog::TRIGGERS[$rule->trigger]['label'] ?? $rule->trigger }} {{ \App\Models\Crm\AutomationRule::STATUSES[$rule->status] ?? $rule->status }} @if ($rule->tested_at) {{ trans_choice(':count match|:count matches', $rule->test_match_count, ['count' => $rule->test_match_count]) }} @else {{ __('Not tested') }} @endif {{ number_format($rule->daily_cap) }}
{{ $rules->links() }}