import { type CityLoaderContext } from '../city-input/city-input'; import { type GetSuggestions, type StructuredAddress } from '../address-autocomplete'; import type { OptionShape } from '../_shared/option'; export type AddressFieldKey = 'street' | 'city' | 'postcode' | 'province'; export interface AddressFieldsProps { /** The controlled address value. */ value?: StructuredAddress; /** Fires with the next full address on any field change. */ onChange?: (next: StructuredAddress) => void; /** * Which address-line fields to render, in order. The country picker * always renders first. Default resolves from the selected country. */ fields?: AddressFieldKey[]; /** Async city suggestion loader, forwarded to CityInput. */ loadCities?: (query: string, ctx: CityLoaderContext) => Promise; /** Float these countries to the top of the country picker. */ popularCountries?: string[]; /** Enable the "find address" bar — provide a Places API key… */ apiKey?: string; /** …or a mock/real suggestion injector (wins over apiKey, like AddressAutocomplete). */ getSuggestions?: GetSuggestions; layout?: 'stacked' | 'grid'; /** Marks fields as required: `true` for every field shown, or a list * of the ones that are (a province is mandatory in some countries * only). The host still validates. */ required?: boolean | readonly (AddressFieldKey | 'country')[]; /** An error message per field, shown under it. The host validates and * decides when to show each one. */ errors?: Partial>; /** Whether a field's message raises `role="alert"`, per field; each * does unless set to `false`. Turn it off for messages shown together, * such as by a refused submit, so they are not all announced at once. */ announceErrors?: Partial>; disabled?: boolean; id?: string; className?: string; } export declare const AddressFields: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=address-fields.d.ts.map