export interface NamePair {
  en: string;
  am: string;
}

export interface LocationType {
  id: string;
  code: string;
  names: NamePair;
  level: number;
  createdAt: string;
  updatedAt: string;
}

export interface Location {
  id: string;
  code: string;
  names: NamePair;
  locationTypeId: string;
  parentId: string | null;
  locationType?: LocationType;
  children?: Location[];
  createdAt: string;
  updatedAt: string;
}

export interface ListResponse<T> {
  count: number;
  items: T[];
}

export interface CreateLocationTypePayload {
  code: string;
  names: NamePair;
  level: number;
}

export interface UpdateLocationTypePayload extends CreateLocationTypePayload {
  id: string;
}

export interface CreateLocationPayload {
  code: string;
  names: NamePair;
  locationTypeId: string;
  parentId?: string | null;
}

export interface UpdateLocationPayload extends CreateLocationPayload {
  id: string;
}
