import * as React from 'react'; import { FunctionComponent, ReactNode } from 'react'; import { ToastEvent } from '../components/toast.js'; import 'class-variance-authority/types'; import '@radix-ui/react-toast'; import 'class-variance-authority'; /** * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a * prop or avoid re-executing effects when passed as a dependency */ declare function useCallbackRef any>(callback: T | undefined): T; type UseControllableStateParams = { prop?: T; defaultProp?: T; onChange?: (state: T) => void; }; declare function useControllableState({ prop, defaultProp, onChange, }: UseControllableStateParams): readonly [T | undefined, React.Dispatch>]; /** * useToast Hook * @param {Object} initialState - The initial state for the hook. * @returns {[state, setState]} - The current state and a function to update the state. */ declare const useToast: () => { toasts: ToastEvent[]; toast: (props: ToastEvent) => void; subscribe: () => void; unsubscribe: () => void; }; interface usePaginationProps { count: number; limit: number; page: number; maxDisplay?: number; } declare function usePagination({ count, limit, page, maxDisplay, }: usePaginationProps): { visiblePages: (string | number)[]; max: number; }; interface ThemeContextType { theme: string; setTheme: (theme: string) => void; defaultTheme: string; } declare const ThemeContext: React.Context; interface ThemeProviderProps { children: ReactNode; defaultTheme?: string; storageKey?: string; } declare const ThemeProvider: FunctionComponent; declare const useTheme: () => ThemeContextType; export { ThemeContext, ThemeProvider, useCallbackRef, useControllableState, usePagination, useTheme, useToast };