import React from 'react';
export declare function useAsyncMemo<T>(fn: () => Promise<T>, deps: React.DependencyList, initialValue: T, resetValue?: T): any;
export declare function useMeasure<T extends Element>(): readonly [DOMRect, any];
export declare function useMeasureForRef<T extends Element>(ref?: React.RefObject<T | null>): [DOMRect, () => void];
export declare function lowerBound<S, T>(array: S[], object: T, comparator: (object: T, b: S) => number, left?: number, right?: number): number;
export declare function upperBound<S, T>(array: S[], object: T, comparator: (object: T, b: S) => number, left?: number, right?: number): number;
export declare function copy(text: string): void;
export declare function useSetting<S>(name: string | undefined, defaultValue: S): [S, React.Dispatch<React.SetStateAction<S>>];
export declare function usePartitionedState<S>(name: string, defaultValue?: S): [S, React.Dispatch<React.SetStateAction<S>>];
export declare function togglePartition(partition: string): void;
declare global {
    interface Window {
        saveSettings?(): void;
    }
}
export declare class Settings {
    onChangeEmitter: EventTarget;
    getString<T extends string>(name: string, defaultValue: T): T;
    setString<T extends string>(name: string, value: T): void;
    getObject<T>(name: string, defaultValue: T): T;
    setObject<T>(name: string, value: T): void;
}
export declare const settings: Settings;
export declare function clsx(...classes: (string | undefined | false)[]): string;
export declare function sha1(str: string): Promise<string>;
export declare function scrollIntoViewIfNeeded(element: Element | undefined): void;
export declare const kWebLinkRe: RegExp;
/**
 * Manages flash animation state.
 * Calling `trigger` will turn `flash` to true for a second, and then back to false.
 * If `trigger` is called while a flash is ongoing, the ongoing flash will be cancelled and after 50ms a new flash is started.
 * @returns [flash, trigger]
 */
export declare function useFlash(): [boolean, React.EffectCallback];
export declare function useCookies(): any;
//# sourceMappingURL=uiUtils.d.ts.map