import { n as StateCode } from "./states-BHJ5gB-2.cjs"; import { t as Municipality } from "./cities-B8mwF_PF.cjs"; //#region src/get-municipalities/get-municipalities.d.ts /** * Returns Brazilian municipalities published by the IBGE, optionally filtered by state. * * If `stateCode` is provided, only municipalities of that state are returned. If it is * omitted, every municipality of every state is returned, sorted with `localeCompare` in the * "pt-BR" locale so accented names land where a Brazilian reader expects them. Every per-state * list is sorted the same way. * * Only an omitted (or `undefined`) `stateCode` asks for the full list: any other value that is * not a known state code, `null` and `""` included, returns `[]`. The sibling `getCities` is * looser and treats every falsy `state` as "no state given", so `getCities(null)` returns the * full list where `getMunicipalities(null)` returns `[]`. * * The state code is matched exactly, case included: `getMunicipalities("sp")` returns `[]` where * `getMunicipalities("SP")` returns the 645 São Paulo municipalities. `getMunicipalities` and * `getCities` are the only state-taking lookups that are case-sensitive; `getStateNameByCode`, * `getTimezoneByState`, `getAreaCodesByState` and `getMunicipality` all fold case. * * @param {StateCode} [stateCode] - The two letter code of the Brazilian state to filter by. * @returns {Municipality[]} A fresh array of fresh `Municipality` objects. Empty when * `stateCode` is not a known state. * * @example * ```typescript * getMunicipalities("SP")[0]; // { code: "3500105", name: "Adamantina", stateCode: "SP" } * getMunicipalities().length; // every municipality of every state * getMunicipalities("ZZ"); // [] * getMunicipalities("sp"); // [] (the state code is case-sensitive here) * getMunicipalities(null); // [] (only an omitted state code asks for the full list) * ``` * * @see Official: https://servicodados.ibge.gov.br/api/docs/localidades */ export declare const getMunicipalities: (stateCode?: StateCode) => Municipality[]; //#endregion export type { Municipality, StateCode };