{{-- Operational-macro warning modal (Push 2G). Fires when the operator applies a macro whose attached action is operational — i.e. one of: - cancel_order - refund_order - edit_address - reship - generate_return_label Macros must NEVER silently run these actions. The warning walks the operator through three explicit choices: 1. Open order panel — closes the warning, opens the slide- out for the active order so the operator runs the right action from More Actions there. 2. Insert macro text only — drops the rendered macro body into the public-reply composer + clears any previous chip / pending attachments. No action call, no ReturnGo HTTP, no label row. 3. Cancel — abandons everything; composer untouched. The warning is the ONLY thing applyMacro produces when an operational macro is staged. attach_file_template + plain-reply macros bypass the warning entirely. --}} @php $opMacroName = (string) ($pendingOperationalMacroName ?? ''); $opActionType = (string) ($pendingOperationalMacroActionType ?? ''); $opOrderId = $pendingOperationalMacroOrderId; $opActionLabel = match ($opActionType) { \App\Actions\Cancel\CancelShopifyOrderAction::KEY => __('Cancel order'), \App\Actions\Refund\RefundShopifyOrderAction::KEY => __('Refund order'), \App\Actions\EditAddress\EditAddressAction::KEY => __('Edit shipping address'), 'reship' => __('Reship'), \App\Actions\GenerateReturnLabel\GenerateReturnLabelAction::KEY => __('Generate return label'), default => __('Operational action'), }; @endphp