// 레이아웃 관련 타입 및 상수 정의

export interface LayoutDef {
  id:    string;
  count: number;       // 차트 슬롯 수
  cols:  string;       // grid-template-columns
  rows:  string;       // grid-template-rows
  areas: string;       // grid-template-areas (슬롯 'a'~'h' 사용)
  label: string;
}

export const LAYOUTS: LayoutDef[] = [
  // ── Row 1: 1 chart ──────────────────────────────────────────────────────
  { id:'1',       count:1, cols:'1fr',               rows:'1fr',              areas:'"a"',                      label:'Single' },
  // ── Row 2: 2 charts ─────────────────────────────────────────────────────
  { id:'2v',      count:2, cols:'1fr 1fr',            rows:'1fr',              areas:'"a b"',                    label:'2 Vertical' },
  { id:'2h',      count:2, cols:'1fr',                rows:'1fr 1fr',          areas:'"a" "b"',                  label:'2 Horizontal' },
  // ── Row 3: 3 charts ─────────────────────────────────────────────────────
  { id:'3v',      count:3, cols:'1fr 1fr 1fr',        rows:'1fr',              areas:'"a b c"',                  label:'3 Vertical' },
  { id:'3h',      count:3, cols:'1fr',                rows:'1fr 1fr 1fr',      areas:'"a" "b" "c"',              label:'3 Horizontal' },
  { id:'3-1t2b',  count:3, cols:'1fr 1fr',            rows:'1fr 1fr',          areas:'"a a" "b c"',              label:'1 Top 2 Bottom' },
  { id:'3-2t1b',  count:3, cols:'1fr 1fr',            rows:'1fr 1fr',          areas:'"a b" "c c"',              label:'2 Top 1 Bottom' },
  { id:'3-1l2r',  count:3, cols:'1fr 1fr',            rows:'1fr 1fr',          areas:'"a b" "a c"',              label:'1 Left 2 Right' },
  { id:'3-2l1r',  count:3, cols:'1fr 1fr',            rows:'1fr 1fr',          areas:'"a c" "b c"',              label:'2 Left 1 Right' },
  // ── Row 4: 4 charts ─────────────────────────────────────────────────────
  { id:'4',       count:4, cols:'1fr 1fr',            rows:'1fr 1fr',          areas:'"a b" "c d"',              label:'4 Grid' },
  { id:'4v',      count:4, cols:'1fr 1fr 1fr 1fr',    rows:'1fr',              areas:'"a b c d"',                label:'4 Vertical' },
  { id:'4h',      count:4, cols:'1fr',                rows:'1fr 1fr 1fr 1fr',  areas:'"a" "b" "c" "d"',          label:'4 Horizontal' },
  { id:'4-1l3r',  count:4, cols:'1fr 1fr 1fr',        rows:'1fr 1fr',          areas:'"a b c" "a d d"',          label:'1L 3R' },
  { id:'4-big',   count:4, cols:'2fr 1fr',            rows:'1fr 1fr',          areas:'"a b" "a c"',              label:'1 Big 2 Right' },
  // ── Row 5: 5 charts ─────────────────────────────────────────────────────
  { id:'5v',      count:5, cols:'1fr 1fr 1fr 1fr 1fr',rows:'1fr',              areas:'"a b c d e"',              label:'5 Vertical' },
  { id:'5-2t3b',  count:5, cols:'1fr 1fr 1fr',        rows:'1fr 1fr',          areas:'"a a b" "c d e"',          label:'2 Top 3 Bottom' },
  { id:'5-3t2b',  count:5, cols:'1fr 1fr 1fr',        rows:'1fr 1fr',          areas:'"a b c" "d d e"',          label:'3 Top 2 Bottom' },
  // ── Row 6: 6 charts ─────────────────────────────────────────────────────
  { id:'6-2x3',   count:6, cols:'1fr 1fr 1fr',        rows:'1fr 1fr',          areas:'"a b c" "d e f"',          label:'2x3 Grid' },
  { id:'6-3x2',   count:6, cols:'1fr 1fr',            rows:'1fr 1fr 1fr',      areas:'"a b" "c d" "e f"',        label:'3x2 Grid' },
  // ── Row 8: 8 charts ─────────────────────────────────────────────────────
  { id:'8-2x4',   count:8, cols:'1fr 1fr 1fr 1fr',   rows:'1fr 1fr',          areas:'"a b c d" "e f g h"',      label:'2x4 Grid' },
  { id:'8-4x2',   count:8, cols:'1fr 1fr',            rows:'1fr 1fr 1fr 1fr',  areas:'"a b" "c d" "e f" "g h"',  label:'4x2 Grid' },
];

export interface SyncOptions {
  symbol:    boolean;
  interval:  boolean;
  crosshair: boolean;
  time:      boolean;
  dateRange: boolean;
}

export const DEFAULT_SYNC: SyncOptions = {
  symbol:    false,
  interval:  false,
  crosshair: true,
  time:      false,
  dateRange: false,
};
