"use client"; /** * V2Layout 설정 패널 * 통합 레이아웃 컴포넌트의 세부 설정을 관리합니다. */ import React from "react"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Checkbox } from "@/components/ui/checkbox"; interface V2LayoutConfigPanelProps { config: Record; onChange: (config: Record) => void; } export const V2LayoutConfigPanel: React.FC = ({ config, onChange, }) => { const updateConfig = (field: string, value: any) => { onChange({ ...config, [field]: value }); }; return (
{/* LAYOUT TYPE 섹션 */}

LAYOUT TYPE

레이아웃 타입
{/* GRID SETTINGS 섹션 */} {(config.layoutType === "grid" || !config.layoutType) && (

GRID SETTINGS

12컬럼 그리드 사용 updateConfig("use12Column", checked)} />
updateConfig("gap", e.target.value)} placeholder="16" className="h-7 text-xs" />
)} {/* SPLIT SETTINGS 섹션 */} {config.layoutType === "split" && (

SPLIT SETTINGS

분할 방향
updateConfig("splitRatio", [Number(e.target.value), 100 - Number(e.target.value)])} placeholder="50" min="10" max="90" className="h-7 text-xs" />
크기 조절 가능 updateConfig("resizable", checked)} />
)} {/* FLEX SETTINGS 섹션 */} {config.layoutType === "flex" && (

FLEX SETTINGS

방향
간격 (px)
updateConfig("gap", e.target.value)} placeholder="16" className="h-7 text-xs" />
줄바꿈 허용 updateConfig("wrap", checked)} />
)} {/* SCREEN EMBED 섹션 */} {config.layoutType === "screen-embed" && (

SCREEN EMBED

화면 ID
updateConfig("screenId", e.target.value ? Number(e.target.value) : undefined)} placeholder="화면 ID" className="h-7 text-xs" />
)}
); }; V2LayoutConfigPanel.displayName = "V2LayoutConfigPanel"; export default V2LayoutConfigPanel;