'use client'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Label } from '@/components/ui/label'; import { Input } from '@/components/ui/input'; import { Textarea } from '@/components/ui/textarea'; interface SectionDialogProps { isSectionDialogOpen: boolean; setIsSectionDialogOpen: (open: boolean) => void; newSectionType: 'fields' | 'bom'; setNewSectionType: (type: 'fields' | 'bom') => void; newSectionTitle: string; setNewSectionTitle: (title: string) => void; newSectionDescription: string; setNewSectionDescription: (description: string) => void; handleAddSection: () => void; } export function SectionDialog({ isSectionDialogOpen, setIsSectionDialogOpen, newSectionType, setNewSectionType, newSectionTitle, setNewSectionTitle, newSectionDescription, setNewSectionDescription, handleAddSection, }: SectionDialogProps) { return ( { setIsSectionDialogOpen(open); if (!open) { setNewSectionType('fields'); setNewSectionTitle(''); setNewSectionDescription(''); } }}> {newSectionType === 'bom' ? 'BOM 섹션' : '일반 섹션'} 추가 {newSectionType === 'bom' ? '새로운 BOM(자재명세서) 섹션을 추가합니다' : '새로운 일반 섹션을 추가합니다'}
setNewSectionTitle(e.target.value)} placeholder={newSectionType === 'bom' ? '예: BOM 구성' : '예: 기본 정보'} />