import { Ref } from 'react';
import { cssStateVariables } from './cssStates';
type CSSStateType<T> = {
    [K in keyof typeof cssStateVariables as K extends 'open' | 'blank' | 'checked' | 'disabled' ? K extends keyof T ? K : never : K]: K extends keyof typeof cssStateVariables ? (typeof cssStateVariables)[K]['values'][keyof (typeof cssStateVariables)[K]['values']] : boolean;
};
/**
 * This hook can be used in two different cases (which some components may need simultaneously):
 * - When a component supports CSS states by using a class like `-:has-nested-hover/ref:state-hover` (rather than `-:hover:state-hover`)
 *   on its root element, it has to use this hook. A tuple is returned; the first element is a `ref` that should be passed to the root
 *   element, and the second one is an object with a `forwardedAttributes` property which should be spread on the root element as well.
 *   This ensures that a class like `hover:opacity-50` set by a consumer is correctly applied when hovering the nested element, rather
 *   than the root. Make sure to pass `open`, `blank`, `checked`, and/or `disabled` if the component supports these states, to prevent
 *   a potential flash of incorrect styles caused by `forwardedAttributes` having the wrong initial values (since the DOM is needed to
 *   get CSS state values).
 * - When a component needs to know the state of a nested component or element that supports CSS states (that is, one that has classes
 *   like `-:hover:state-hover` or `-:has-nested-hover/ref:state-hover`), then you can call this hook, pass the returned `ref` to said
 *   component/element, and inspect the variables available on the returned `state` object (the tuple's second element).
 */
export declare function useCSSState<T extends {
    ref?: Ref<HTMLElement>;
    open?: boolean | undefined;
    blank?: boolean | undefined;
    checked?: boolean | 'indeterminate' | undefined;
    disabled?: boolean | 'read-only' | undefined;
} = {}>(options?: T, onChange?: (state: CSSStateType<T>) => void): readonly [import('react').RefCallback<HTMLElement>, CSSStateType<T> & {
    readonly forwardedAttributes: Record<string, string>;
}];
export {};
//# sourceMappingURL=useCSSState.d.ts.map