export interface MasterOptionItem {
  id: string;
  organization_id: string;
  category: string;
  code: string;
  label: string;
  value: string | null;
  parent_id: string | null;
  parent_label: string | null;
  sort_order: number;
  is_active: boolean;
  metadata: Record<string, unknown> | null;
  deleted_at: string | null;
  created_at: string;
  updated_at: string;
}

export interface MasterOptionsFilters {
  page?: number;
  limit?: number;
  search?: string;
  category?: string;
  sort?: string;
}

export interface MasterOptionMutationPayload {
  category: string;
  code: string;
  label: string;
  value?: string | null;
  parent_id?: string | null;
  sort_order?: number;
  is_active?: boolean;
  metadata?: Record<string, unknown> | null;
}

export interface MasterOptionsResponse {
  success: boolean;
  time: string;
  message: string;
  total_items: number;
  offset: number;
  limit: number;
  items: MasterOptionItem[];
}

export interface MasterOptionDetailResponse {
  success: boolean;
  time: string;
  message: string;
  item: MasterOptionItem;
}

export interface MasterOptionCategoriesResponse {
  success: boolean;
  time: string;
  message: string;
  items: Array<{
    category: string;
    total_items: number;
    active_items: number;
  }>;
}

export interface MutationSuccessResponse {
  success: boolean;
  message: string;
}
