/** * 確認對話框組件 */ 'use client' interface ConfirmDialogProps { isOpen: boolean title: string message: string confirmText?: string cancelText?: string onConfirm: () => void onCancel: () => void type?: 'info' | 'warning' | 'error' | 'success' } export default function ConfirmDialog({ isOpen, title, message, confirmText = '確定', cancelText = '取消', onConfirm, onCancel, type = 'warning', }: ConfirmDialogProps) { if (!isOpen) return null const getIcon = () => { switch (type) { case 'error': return (
) case 'warning': return (
) case 'success': return (
) case 'info': return (
) } } return (
e.stopPropagation()} >
{getIcon()}

{title}

{message}

) }