import type { ButtonProps } from './Button'; import { Button } from './Button'; import { HStack } from './Stacks'; export interface ConfirmProps { onHide: () => void; onResult: (result: boolean) => void; variant?: 'delete' | 'confirm'; confirmText?: string; } const colors: Record, ButtonProps['color']> = { delete: 'danger', confirm: 'primary', }; const confirmButtonTexts: Record, string> = { delete: 'Delete', confirm: 'Confirm', }; export function Confirm({ onHide, onResult, confirmText, variant = 'confirm' }: ConfirmProps) { const handleHide = () => { onResult(false); onHide(); }; const handleSuccess = () => { onResult(true); onHide(); }; return ( ); }