"use client"; import { useDrag } from "react-dnd"; import { Type, MousePointer, List, Activity, ScanLine, Calculator, GripVertical, Space, WrapText, } from "lucide-react"; import { cn } from "@/lib/utils"; import { PopComponentType } from "../types/pop-layout"; import { DND_ITEM_TYPES, DragItemComponent } from "./PopPanel"; // ======================================== // 컴포넌트 팔레트 정의 // ======================================== const COMPONENT_PALETTE: { type: PopComponentType; label: string; icon: React.ElementType; description: string; }[] = [ { type: "pop-field", label: "필드", icon: Type, description: "텍스트, 숫자 등 데이터 입력", }, { type: "pop-button", label: "버튼", icon: MousePointer, description: "저장, 삭제 등 액션 실행", }, { type: "pop-list", label: "리스트", icon: List, description: "데이터 목록 (카드 템플릿 지원)", }, { type: "pop-indicator", label: "인디케이터", icon: Activity, description: "KPI, 상태 표시", }, { type: "pop-scanner", label: "스캐너", icon: ScanLine, description: "바코드/QR 스캔", }, { type: "pop-numpad", label: "숫자패드", icon: Calculator, description: "숫자 입력 전용", }, { type: "pop-spacer", label: "스페이서", icon: Space, description: "빈 공간 (정렬용)", }, { type: "pop-break", label: "줄바꿈", icon: WrapText, description: "강제 줄바꿈 (flex-basis: 100%)", }, ]; // ======================================== // v4 컴포넌트 팔레트 // ======================================== export function ComponentPaletteV4() { return (