/**
 * V2 카테고리 관리 컴포넌트 타입 정의
 */

// 카테고리 값 타입
export interface CategoryValue {
  valueId: number;
  tableName: string;
  columnName: string;
  valueCode: string;
  valueLabel: string;
  valueOrder: number;
  parentValueId: number | null;
  depth: number;
  path: string | null;
  description: string | null;
  color: string | null;
  icon: string | null;
  isActive: boolean;
  isDefault: boolean;
  companyCode: string;
  createdAt: string;
  updatedAt: string;
  children?: CategoryValue[];
}

// 뷰 모드 타입
export type ViewMode = "tree" | "list";

// 컴포넌트 설정 타입
export interface V2CategoryManagerConfig {
  tableName?: string;
  columnName?: string;
  menuObjid?: number;
  viewMode: ViewMode;
  showViewModeToggle: boolean;
  defaultExpandLevel: number;
  showInactiveItems: boolean;
  leftPanelWidth: number;
  showColumnList: boolean;
  height: string | number;
}

// 기본 설정
export const defaultV2CategoryManagerConfig: V2CategoryManagerConfig = {
  viewMode: "tree",
  showViewModeToggle: true,
  defaultExpandLevel: 1,
  showInactiveItems: false,
  leftPanelWidth: 15,
  showColumnList: true,
  height: "100%",
};

