@if(session('success'))
{{ session('success') }}
@endif {{-- Header --}}

{{ __('Contact Groups') }}

{{ __('Organize contacts into groups for campaigns, inbox, and workflows.') }}

{{-- Create/Edit Form --}} @if($showForm)

{{ $editingId ? __('Edit Group') : __('Create Group') }}

@error('name')

{{ $message }}

@enderror
@endif {{-- Groups List --}} @if($lists->isEmpty() && !$showForm)

{{ __('No groups yet') }}

{{ __('Create your first group to organize contacts for campaigns, inbox, and workflows.') }}

@else
@foreach($lists as $list)

{{ $list->name }}

{{ $list->contacts_count ?? 0 }} {{ ($list->contacts_count ?? 0) !== 1 ? __('contacts') : __('contact') }}
{{-- Actions dropdown --}}
@if($list->description)

{{ $list->description }}

@endif
@endforeach
@endif {{-- Delete Confirmation --}} @if($confirmDeleteId)

{{ __('Delete Group?') }}

{{ __('This will remove the group and unlink all contacts from it. The contacts themselves will not be deleted.') }}

@endif {{-- Add Contacts Modal --}} @if($showAddContacts && $addingToListId)

{{ __('Add Contacts to Group') }}

{{-- Search --}}
{{-- Contact list --}}
@forelse($availableContacts as $contact) @empty

@if(strlen($contactSearch) < 2) {{ __('Type at least 2 characters to search contacts...') }} @else {{ __('No contacts found for') }} "{{ $contactSearch }}" @endif

@endforelse
{{-- Footer --}}
{{ count($selectedContactIds) }} {{ __('selected') }}
@endif