import type { DateFrameworkType, SaltDateAdapter } from "@salt-ds/date-adapters"; export interface LocalizationProviderValue { defaultDates: { minDate: TDate; maxDate: TDate; }; dateAdapter: SaltDateAdapter; } /** * Props for the LocalizationProvider component. * * @template TDate - The type of the date object used in the provider. * @template TLocale - The type of the locale, defaulting to string. */ export interface LocalizationProviderProps { /** * The child components to be rendered within the provider. */ children?: React.ReactNode; /** * The instance of the date library being used. */ instance?: any; /** * The date adapter class, which provides methods for date manipulation and formatting. * This should be a constructor for a class implementing the SaltDateAdapter interface. */ DateAdapter: new (...args: any) => SaltDateAdapter; /** * The locale to be used for date formatting and manipulation. */ locale?: TLocale; /** * The minimum date allowed for all date selections. * Defaults to January 1, 1900. */ minDate?: TDate; /** * The maximum date allowed for all date selections. * Defaults to December 31, 2099. */ maxDate?: TDate; } export type LocalizationProviderContext = { [K in keyof LocalizationProviderValue]: LocalizationProviderValue[K] | null; }; export declare const LocalizationProviderContext: import("react").Context | null>; export declare const LocalizationProvider: (props: LocalizationProviderProps) => import("react/jsx-runtime").JSX.Element; /** * Custom hook to access the localization context. * * This hook provides access to the localization settings and utilities * within the `LocalizationProviderContext`. It should be used within a * component that is a descendant of `LocalizationProviderContext.Provider`. * * @template TDate - The type of the date object used in the localization context. * * @returns The localization provider value, which includes date manipulation and formatting utilities. * * @throws Will throw an error if the hook is used outside of a `LocalizationProviderContext.Provider`. */ export declare const useLocalization: () => LocalizationProviderValue;