import React from 'react';
import { ShieldAlert, X } from 'lucide-react';

interface BankAccountConfirmModalProps {
  open: boolean;
  onClose: () => void;
  onConfirm: () => void;
}

export function BankAccountConfirmModal({
  open,
  onClose,
  onConfirm,
}: BankAccountConfirmModalProps) {
  if (!open) return null;

  return (
    <div className="vm-modal-backdrop" role="presentation" onClick={onClose}>
      <div
        className="vm-modal vm-modal-sm"
        role="dialog"
        aria-modal="true"
        aria-labelledby="sm-bank-title"
        onClick={(event) => event.stopPropagation()}
      >
        <header className="vm-modal-header">
          <h2 id="sm-bank-title">确认变更银行账户</h2>
          <button type="button" className="vm-modal-close" onClick={onClose} aria-label="关闭">
            <X size={18} aria-hidden />
          </button>
        </header>
        <div className="sm-modal-body">
          <div className="sm-modal-alert">
            <ShieldAlert size={18} aria-hidden />
            <div>
              <p>银行账户属于关键主数据字段，变更后将写入变更记录并需财务复核（原型演示）。</p>
              <p className="sm-modal-sub">请确认开户行与银行账号信息准确无误。</p>
            </div>
          </div>
        </div>
        <footer className="vm-modal-footer">
          <button type="button" className="vm-btn vm-btn-ghost" onClick={onClose}>取消</button>
          <button type="button" className="vm-btn vm-btn-primary" onClick={onConfirm}>确认变更</button>
        </footer>
      </div>
    </div>
  );
}
