/**
 * @module viw-webgl-react
 */
import { StateRef } from '../helpers/reactUtils';
import { SettingsCustomizer } from './settingsItem';
import { AnySettings } from './anySettings';
import { RecursivePartial } from '../../utils';
export type SettingsState<T extends AnySettings> = {
    value: T;
    update: (updater: (s: T) => void) => void;
    register: (action: (s: T) => void) => void;
    customizer: StateRef<SettingsCustomizer<T>>;
};
/**
 * Returns a new state closure for settings.
 */
export declare function useSettings<T extends AnySettings>(value: RecursivePartial<T>, defaultSettings: T, applySettings?: (settings: T) => void): SettingsState<T>;
export declare function createSettings<T extends AnySettings>(settings: RecursivePartial<T>, defaultSettings: T): T;
