import { FieldProps, WidgetProps } from "../types";
export type Settings = Record<string, string>;
type OnSettingsChange = (settings: Record<string, string>) => void;
/**
 * Handles parsing settings from uiSchema. Settings can be either global or form specific (it's up to the client using LajiForm to pass the global or form specific settings).
 */
export default class SettingsService {
    settings: Settings;
    private settingSavers;
    private _onSettingsChange;
    constructor(onSettingsChange: OnSettingsChange, settings?: Settings);
    addSettingSaver: (key: string, fn: () => any) => void;
    removeSettingSaver: (key: string) => void;
    setSettings(settings?: Settings): void;
    getSettings(): {
        [x: string]: any;
    };
    onSettingsChange: () => void;
    /**
     * Should be binded at React Class Component constructor. The component will unbind automatically when unmounted.
     * Hooks into the component React hooks componentDidMount, componentWillUnmount & componentDidUpdate.
     *
     * @param that this of the React component
     * @param props The constructor props
     */
    bind<P extends (FieldProps<any> | WidgetProps)>(that: React.Component<P>, props: P): void;
    private loadStateSettings;
    loadContextSettings<P extends FieldProps | WidgetProps>(props: P, context: any): any;
    private loadSettings;
    updateSettingSaver<P extends (FieldProps | WidgetProps)>(that: React.Component<P>): void;
    private getSettingsKey;
    private getIdSchemaId;
}
export {};
