# pan confirm — Confirmation Popup

Opens an interactive confirmation popup. Exits with code 0 on accept, 1 on cancel.

## Usage

```
pan confirm [OPTIONS]
```

## Options

| Flag                     | Default              | Description                        |
|--------------------------|----------------------|------------------------------------|
| `-m`, `--message`        | `"¿Deseas continuar?"` | Body message inside the popup    |
| `-t`, `--title`          | `"Confirmación"`     | Title in the popup header          |
| `-v`, `--variant`        | `"warning"`          | Color: success, warning, danger, none |
| `-y`, `--confirm`        | `"Confirmar"`        | Confirm button label               |
| `-n`, `--cancel`         | `"Cancelar"`         | Cancel button label                |
| `-W`, `--width`          | `0` (auto)           | Popup width                        |
| `-H`, `--height`         | `0` (auto)           | Popup height                       |
| `--guide`                |                      | Show this guide                    |

## Exit codes

| Code | Meaning         |
|------|-----------------|
| 0    | User confirmed  |
| 1    | User cancelled  |

## Examples

```bash
# Basic usage — run command only if confirmed
pan confirm -m "¿Eliminar archivo?" -v danger && rm archivo

# Conditional
if pan confirm -t "Actualizar" -m "¿Proceder con la actualización?"; then
    make deploy
else
    echo "Cancelado"
fi

# Custom button labels
pan confirm -m "¿Continuar?" -y "Sí" -n "No"

# Simple message with default title
pan confirm -m "Operación completada" -v success
```

## Mouse

- **Buttons**: click to confirm or cancel
- **Drag**: click and hold on the border or title bar to move the popup

## Keyboard

| Key              | Action                |
|------------------|-----------------------|
| `y` / `Enter`    | Confirm               |
| `n` / `Esc`      | Cancel                |
| `Ctrl` + `c`     | Emergency exit        |
