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

{{ __('Drip Sequence') }}

{{ __('Send automated follow-up emails on a schedule.') }}

@if($sequenceId && count($steps) > 0) @if($sequence?->status === 'active') @else @endif @endif
{{-- Sequence name --}}
@error('sequenceName')

{{ $message }}

@enderror
@if($sequence)
{{ ucfirst($sequence->status ?? 'draft') }} {{ $enrollmentCount }} {{ __('enrolled') }} {{ $activeEnrollments }} {{ __('active') }}
@endif
{{-- Steps timeline --}}

Steps ({{ count($steps) }})

@if(empty($steps))

{{ __('No steps yet. Add your first step to start building the drip sequence.') }}

@else
@foreach($steps as $index => $step)
{{-- Timeline connector --}} @if(!$loop->last)
@endif {{-- Step number circle --}}
{{ $index + 1 }}
{{-- Step content --}}
{{ $this->getDelayLabel($step['delay_value'], $step['delay_unit']) }} {{ $this->getActionLabel($step['action_type']) }}
@if($index > 0) @endif @if($index < count($steps) - 1) @endif
{{-- Action details --}} @if($step['action_type'] === 'send_email')

{{ $step['action_data']['subject'] ?? __('No subject') }}

{{ strip_tags($step['action_data']['body'] ?? '') ?: __('No body content') }}

@elseif($step['action_type'] === 'add_tag')

Add tag: {{ $step['action_data']['tag_name'] ?? '—' }}

@elseif($step['action_type'] === 'remove_tag')

Remove tag: {{ $step['action_data']['tag_name'] ?? '—' }}

@elseif($step['action_type'] === 'update_field')

Set {{ $step['action_data']['field'] ?? 'field' }} to {{ $step['action_data']['value'] ?? '—' }}

@endif
@endforeach
@endif {{-- Add step form --}} @if($showAddStep)

{{ __('Add New Step') }}

{{-- Delay --}}
@error('newDelayValue')

{{ $message }}

@enderror
{{-- Action type --}}
{{-- Action-specific fields --}} @if($newActionType === 'send_email')
@elseif($newActionType === 'add_tag' || $newActionType === 'remove_tag')
@elseif($newActionType === 'update_field')
@endif {{-- Actions --}}
@endif