@props([ 'type' => 'warning', // icon type: warning, error, success, info 'title' => 'Are you sure?', 'description' => 'This action cannot be undone.', 'acceptLabel' => 'Confirm', 'acceptColor' => 'positive', // WireUI keys: primary, positive, negative, warning, info 'rejectLabel' => 'Cancel', 'rejectColor' => 'secondary', 'action' => '', 'actionParams' => [], 'formRef' => null ]) @php // Logic to determine if we submit a standard form or a Livewire action $executeJs = $formRef ? "\$refs['{$formRef}'].submit()" : "\$wire.{$action}(" . collect($actionParams)->implode(', ') . ")"; @endphp