// 시트 관련 타입 정의

export interface SheetData {
  id: string;
  name: string;
  data: any[][]; // Luckysheet 데이터 형식
  config?: LuckysheetConfig;
  xlsxBuffer?: ArrayBuffer; // 변환된 XLSX ArrayBuffer
}

export interface LuckysheetConfig {
  container: string;
  title: string;
  lang: "en" | "ko";
  data: any[];
  options?: {
    showtoolbar?: boolean;
    showinfobar?: boolean;
    showsheetbar?: boolean;
    showstatisticBar?: boolean;
    allowCopy?: boolean;
    allowEdit?: boolean;
    enableAddRow?: boolean;
    enableAddCol?: boolean;
  };
}

export interface FileUploadResult {
  success: boolean;
  data?: SheetData[];
  error?: string;
  fileName?: string;
  fileSize?: number;
  file?: File;
  xlsxBuffer?: ArrayBuffer; // 변환된 XLSX ArrayBuffer
}

export interface ExportOptions {
  format: "xlsx" | "csv" | "json";
  fileName: string;
  sheetIndex?: number;
}

export interface CellPosition {
  row: number;
  col: number;
}

export interface CellRange {
  startRow: number;
  startCol: number;
  endRow: number;
  endCol: number;
}

export interface SelectedRange {
  range: CellRange;
  sheetId: string;
}
