"use client"; import { X, Info } from "lucide-react"; import { useFlowEditorStore } from "@/lib/stores/flowEditorStore"; import { PropertiesPanel } from "./panels/PropertiesPanel"; import { getNodePaletteItem } from "./sidebar/nodePaletteConfig"; const TOSS_NODE_HINTS: Record = { tableSource: "어떤 테이블에서 데이터를 가져올지 선택해 주세요", externalDBSource: "외부 데이터베이스 연결 정보를 입력해 주세요", restAPISource: "호출할 API의 URL과 방식을 설정해 주세요", condition: "어떤 조건으로 데이터를 분기할지 설정해 주세요", dataTransform: "데이터를 어떻게 변환할지 규칙을 정해 주세요", aggregate: "어떤 기준으로 집계할지 설정해 주세요", formulaTransform: "계산에 사용할 수식을 입력해 주세요", insertAction: "데이터를 저장할 테이블과 필드를 매핑해 주세요", updateAction: "수정할 조건과 필드를 설정해 주세요", deleteAction: "삭제 조건을 설정해 주세요", upsertAction: "저장/수정 조건과 필드를 설정해 주세요", emailAction: "메일 서버와 발송 정보를 설정해 주세요", scriptAction: "실행할 스크립트 내용을 입력해 주세요", httpRequestAction: "요청 URL과 방식을 설정해 주세요", procedureCallAction: "호출할 프로시저 정보를 입력해 주세요", comment: "메모 내용을 자유롭게 작성해 주세요", }; interface SlideOverSheetProps { isOpen: boolean; onClose: () => void; } export function SlideOverSheet({ isOpen, onClose }: SlideOverSheetProps) { const { nodes, selectedNodes } = useFlowEditorStore(); const selectedNode = selectedNodes.length === 1 ? nodes.find((n) => n.id === selectedNodes[0]) : null; const nodeInfo = selectedNode ? getNodePaletteItem(selectedNode.type as string) : null; const hint = selectedNode ? TOSS_NODE_HINTS[(selectedNode.type as string)] || "이 노드의 속성을 설정해 주세요" : ""; return (
{/* 헤더 */}
{nodeInfo && ( )}

{nodeInfo?.label || "속성"}

{selectedNode && (

{(selectedNode.data as any)?.displayName || "이름 없음"}

)}
{/* 힌트 배너 */} {hint && (

{hint}

)} {/* 속성 패널 내용 (라이트 배경으로 폼 가독성 유지) */}
); }