import { type ReactNode } from 'react'; export interface CancelReason { value: string; label: string; /** Ayuda corta bajo el motivo. */ hint?: string; /** Exige apuntar a un documento sustituto (motivo 01 del SAT). */ requiresSubstitute?: boolean; /** El motivo no aplica a este documento (se ve deshabilitado con `disabledReason`). */ disabled?: boolean; disabledReason?: string; } export interface CancelPayload { reason: string; substitute?: string; } export interface CancelWithReasonProps { open: boolean; onOpenChange: (open: boolean) => void; /** Identificación del documento («Factura A-1042»). */ documentLabel: string; title?: string; reasons: CancelReason[]; /** Consecuencias que se muestran en el paso de confirmación (§6.2). */ consequences: string[]; /** * Aviso según el motivo elegido, p. ej. «requiere aceptación del receptor». * Devuelve `undefined` si no hay. */ notice?: (reason: CancelReason) => string | undefined; /** Formato del identificador del sustituto; si se define, valida en línea. */ substitutePattern?: RegExp; substituteLabel?: string; substituteHelp?: string; /** Zona para crear el sustituto desde el mismo asistente (el host la implementa). */ substituteSlot?: (props: { value: string; onChange: (v: string) => void; }) => ReactNode; /** Ejecuta la cancelación; debe lanzar con `message` si falla. */ onConfirm: (payload: CancelPayload) => Promise; /** Se llama tras un éxito, antes de cerrar. */ onDone?: () => void; confirmLabel?: string; } export declare function CancelWithReason(props: CancelWithReasonProps): import("react").JSX.Element; //# sourceMappingURL=cancel-with-reason.d.ts.map