import { useState } from 'react'; import { Settings, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Typography } from '@/components/ui/typography'; import { Input } from '@/components/ui/input'; import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@/components/ui/table'; import { type QuotationSetting } from '../types'; import type { SettingInput } from '../hooks/useQuotations'; type QuotationSettingsModalProps = { open: boolean; settings: QuotationSetting[]; onAdd: (input: SettingInput) => boolean; onDelete: (id: string) => void; onClose: () => void; }; export function QuotationSettingsModal({ open, settings, onAdd, onDelete, onClose, }: QuotationSettingsModalProps) { const [targetMargin, setTargetMargin] = useState(''); const [cardUseCount, setCardUseCount] = useState(''); if (!open) return null; // 세팅은 목표 마진율·카드 사용 횟수만. 낙찰 정책은 견적 생성으로 이관, 앵커링은 칸 rate(v1.2)로 대체. const handleAdd = (e: React.FormEvent) => { e.preventDefault(); const ok = onAdd({ targetMargin, cardUseCount }); if (ok) { setTargetMargin(''); setCardUseCount(''); } }; return (