'use client';
// ConfirmActionBar — 确认预览页底部操作：提交审核 / 重新生成
interface ConfirmActionBarProps {
  submitting: boolean;
  regenerating: boolean;
  canSubmit: boolean;
  onSubmit: () => void;
  onRegenerate: () => void;
}

export function ConfirmActionBar({
  submitting, regenerating, canSubmit, onSubmit, onRegenerate,
}: ConfirmActionBarProps) {
  return (
    <div className="flex gap-3 mt-8">
      <button
        onClick={onRegenerate}
        disabled={regenerating || submitting}
        aria-label="重新生成（飞轮-1）"
        className="px-6 py-2.5 text-sm text-text-secondary border border-border-default rounded-lg hover:bg-surface-tertiary disabled:opacity-50"
      >
        {regenerating ? '重新生成中…' : '重新生成'}
      </button>
      <button
        onClick={onSubmit}
        disabled={submitting || regenerating || !canSubmit}
        aria-label="提交审核"
        className="flex-1 bg-brand-orange text-white rounded-lg py-2.5 text-sm font-medium hover:bg-orange-600 disabled:opacity-50"
      >
        {submitting ? '提交中…' : '提交审核'}
      </button>
    </div>
  );
}
