{{-- Confirm Dialog Component Props: $id – unique identifier $title – dialog heading (default: 'Are you sure?') $message – body text $confirmText – confirm button label (default: 'Confirm') $cancelText – cancel button label (default: 'Cancel') $variant – danger|primary (default: danger) $action – form action URL (optional – for DELETE forms) Usage: Delete --}} @props([ 'id' => 'confirm', 'title' => 'Are you sure?', 'message' => 'This action cannot be undone.', 'confirmText' => 'Confirm', 'cancelText' => 'Cancel', 'variant' => 'danger', 'action' => null, 'method' => 'DELETE', 'requirePassword' => false, ]) {{ $message }} @if($action) @csrf @if(! in_array(strtoupper($method), ['GET', 'POST'])) @method($method) @endif @if($requirePassword) @endif {{ $cancelText }} @php $buttonComponent = 'buttons.' . $variant; @endphp {{ $confirmText }} @else {{ $cancelText }} @php $buttonComponent = 'buttons.' . $variant; @endphp {{ $confirmText }} @endif
{{ $message }}