import React from "react"; import { AdminRegionQuestion } from "../formDesign"; import { AdminRegionAnswerValue } from "../response"; import { AdminRegionRow } from "../formContext"; /** Localizes strings. Must be called as T("some string") or someThing.T("some string") */ type LocalizeString = (str: string, ...args: any[]) => string; /** Props for admin region answer component */ export interface AdminRegionAnswerComponentProps { /** Question design */ question: AdminRegionQuestion; /** Current answer value */ value?: AdminRegionAnswerValue; /** Called when the committed answer value changes */ onValueChange: (value?: AdminRegionAnswerValue) => void; /** Get a specific administrative region */ getAdminRegion: (id: number) => Promise; /** Get child administrative regions */ getAdminRegionChildren: (parentId: number | null, level: number) => Promise; /** Localizer to use */ T: LocalizeString; /** Locale to use */ locale?: string; /** True if an alternate is selected. Resets editing mode. */ alternateSelected?: boolean; } /** Ref exposed by admin region answer component */ export interface AdminRegionAnswerComponentRef { /** Validate incomplete in-progress selections */ validate: () => string | boolean | null; } /** Administrative region cascading dropdown answer component */ export declare const AdminRegionAnswerComponent: React.ForwardRefExoticComponent>; export {};