"use client"; import React, { useState, useEffect } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Switch } from "@/components/ui/switch"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from "@/components/ui/dialog"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Plus, Trash2, Settings as SettingsIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import { FormFieldConfig, LinkedFieldMapping, FIELD_TYPE_OPTIONS, SELECT_OPTION_TYPE_OPTIONS, LINKED_FIELD_DISPLAY_FORMAT_OPTIONS, } from "../types"; import { apiClient } from "@/lib/api/client"; // 카테고리 컬럼 타입 (table_column_category_values 용) interface CategoryColumnOption { tableName: string; columnName: string; columnLabel: string; valueCount: number; // 조합키: tableName.columnName key: string; } // 도움말 텍스트 컴포넌트 const HelpText = ({ children }: { children: React.ReactNode }) => (
{children}
); interface FieldDetailSettingsModalProps { open: boolean; onOpenChange: (open: boolean) => void; field: FormFieldConfig; onSave: (updates: Partial