import { RefObject } from '@react-types/shared';

/**
 * Checks whether a particular Tailwind CSS viewport size applies.
 *
 * @param size The size to check, which must either be included in Tailwind CSS's
 * list of default screen sizes, or added to the Tailwind CSS config file.
 *
 * @returns A boolean indicating whether the viewport size applies.
 */
declare const useBreakpoint: (size: "sm" | "md" | "lg" | "xl" | "2xl") => boolean;

type UseClipboardReturnType = {
    /**
     * The state indicating whether the text has been copied.
     * If a string is provided, it will be used as the identifier for the copied state.
     */
    copied: string | boolean;
    /**
     * Function to copy text to the clipboard using the modern clipboard API.
     * Falls back to the fallback function if the modern API fails.
     *
     * @param {string} text - The text to be copied.
     * @param {string} [id] - Optional identifier to set the copied state.
     * @returns {Promise<Object>} - A promise that resolves to an object containing:
     *  - `success` (boolean): Whether the copy operation was successful.
     *  - `error` (Error | undefined): The error object if the copy operation failed.
     */
    copy: (text: string, id?: string) => Promise<{
        success: boolean;
        error?: Error;
    }>;
};
/**
 * Custom hook to copy text to the clipboard.
 *
 * @returns {UseClipboardReturnType} - An object containing the copied state and the copy function.
 */
declare const useClipboard: () => UseClipboardReturnType;

/**
 * The options for the useResizeObserver hook.
 */
type useResizeObserverOptionsType<T> = {
    /**
     * The ref to the element to observe.
     */
    ref: RefObject<T | undefined | null> | undefined;
    /**
     * The box to observe.
     */
    box?: ResizeObserverBoxOptions;
    /**
     * The callback function to call when the size changes.
     */
    onResize: () => void;
};
/**
 * A hook that observes the size of an element and calls a callback function when the size changes.
 * @param options - The options for the hook.
 */
declare function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>): void;

export { useBreakpoint, useClipboard, useResizeObserver };
