/**
 * 메뉴 관련 타입 정의
 */

export interface MenuItem {
  objid: string;
  parent_obj_id: string;
  menu_name_kor: string;
  menu_name_eng: string;
  menu_url: string;
  menu_desc: string;
  status: "ACTIVE" | "INACTIVE";
  status_title: string;
  seq: number;
  lev: number;
  menu_type: "admin" | "user";
  lpad_menu_name_kor: string;
  writer?: string;
  regdate?: string;
  company_code?: string;
  company_name?: string;

  // 계층적 메뉴 구조를 위한 필드들
  children?: MenuItem[];

  // 아이콘 필드
  menu_icon?: string;

  // 번역 관련 필드들
  translated_name?: string;
  translated_desc?: string;
  lang_key?: string;
  lang_key_desc?: string;
}

export interface MenuState {
  menu_list: MenuItem[];
  expanded_menus: Set<string>;
  isLoading: boolean;
}

export interface MenuFormData {
  menu_name_kor: string;
  menu_name_eng: string;
  menu_url: string;
  menu_desc: string;
  status: "ACTIVE" | "INACTIVE";
  seq: number;
  parent_obj_id: string;
  menu_type: "admin" | "user";
}

export interface MenuApiResponse {
  success: boolean;
  data?: MenuItem[];
  message?: string;
  error_code?: string;
}

export interface MenuFormResponse {
  success: boolean;
  message: string;
  error_code?: string;
}
