/**
 * React Query key factory for the geography reference-data domain. Hierarchical keys let a
 * province's cities and a city's districts be cached independently and served from cache on
 * every revisit (and shared across both editors + f6 search). Reference data is fetched once
 * per session, so these keys are never invalidated by this phase.
 */
export const geographyKeys = {
  all: ['geography'] as const,
  provinces: () => [...geographyKeys.all, 'provinces'] as const,
  cities: (provinceId?: number | null) => [...geographyKeys.all, 'cities', provinceId ?? null] as const,
  districts: (cityId?: number | null) => [...geographyKeys.all, 'districts', cityId ?? null] as const,
};
