/*!
 * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
 *
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and limitations under the License.
 */
import { DateTime } from "luxon";
import { FocusEventHandler } from "react";
import { FieldComponentProps } from "../FieldComponentProps.js";
import { TimeZoneOption, TimeZonePickerProps } from "./TimeZonePicker.js";
export type OdysseyDateFieldProps = {
    /**
     * default value when uncontrolled.
     *
     * NOTE: Must be a date string in ISO format
     */
    defaultValue?: string;
    /**
     * Disable specific date(s).
     *
     * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
     */
    isDateEnabled?: (date: Date) => boolean;
    /**
     * Disable specific month(s).
     */
    isMonthEnabled?: (date: Date) => boolean;
    /**
     * Disable specific year(s).
     */
    isYearEnabled?: (date: Date) => boolean;
    /**
     * The label for the `input` element.
     */
    label: string;
    /**
     * Maximum date allowed.
     *
     * NOTE: If not a valid date string in ISO format, `maxDate` will not apply
     */
    maxDate?: string;
    /**
     * Minimum date allowed.
     *
     * NOTE: If not a valid date string in ISO format, `minDate` will not apply
     */
    minDate?: string;
    /**
     * Callback fired when the a date field loses focus
     */
    onBlur?: FocusEventHandler<HTMLInputElement>;
    /**
     * Callback fired when the a date is selected with the calendar.
     */
    onCalendarDateChange?: ({ value, timeZone, }: {
        timeZone: string;
        value: string | undefined;
    }) => void;
    /**
     * Callback fired when the date/text input changes.
     */
    onInputChange?: (value: string) => void;
    /**
     * a default timezone for the picker
     */
    timeZone?: string;
    /**
     * If provided, a `TimeZonePicker` will be rendered below the DatePicker. These options will populate as the Autocomplete options
     */
    timeZoneOptions?: TimeZoneOption[];
    /**
     * label for `TimeZonePicker`
     */
    timeZonePickerLabel?: TimeZonePickerProps["label"];
    /**
     * value when controlled.
     *
     * NOTE: Must be a date string in ISO format or it will not be applied
     */
    value?: string;
};
type FormatDateTimeToUtcIsoDateString = (value: DateTime) => string | undefined;
export declare const useOdysseyDateFields: ({ defaultValue, isDateEnabled, isMonthEnabled, isYearEnabled, minDate: minDateProp, maxDate: maxDateProp, onInputChange: onInputChangeProp, timeZone, value, }: Pick<OdysseyDateFieldProps, "defaultValue" | "isDateEnabled" | "isMonthEnabled" | "isYearEnabled" | "minDate" | "maxDate" | "onInputChange" | "timeZone" | "value"> & Pick<FieldComponentProps, "errorMessage">) => {
    closeCalendar: () => void;
    commonIcons: {
        ArrowLeftIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../SvgIcon.js").SvgIconNoChildrenProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>>;
        ArrowRightIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../SvgIcon.js").SvgIconNoChildrenProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>>;
        CalendarIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../SvgIcon.js").SvgIconNoChildrenProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>>;
        ChevronDownIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("../SvgIcon.js").SvgIconNoChildrenProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>>;
    };
    defaultedLanguageCode: string;
    formatDateTimeToUtcIsoDateString: FormatDateTimeToUtcIsoDateString;
    formatDayOfWeek: (date: DateTime) => string;
    inputValues: {
        value: DateTime<true> | DateTime<false>;
        defaultValue?: undefined;
    } | {
        defaultValue: DateTime<true> | DateTime<false>;
        value?: undefined;
    } | null;
    internalTimeZone: string;
    internalValueRef: import("react").MutableRefObject<DateTime<boolean> | null>;
    isOpen: boolean;
    isValidTimeZone: (timeZone: string) => boolean;
    localeText: import("./useDateFieldsTranslations.js").DateFieldsTranslations;
    maxDate: DateTime<boolean> | undefined;
    minDate: DateTime<boolean> | undefined;
    popperElement: HTMLInputElement | null | undefined;
    onInputChange: (value: string) => void;
    onTimeZoneChange: (timeZone: string | undefined) => void;
    setInternalTimeZone: import("react").Dispatch<import("react").SetStateAction<string>>;
    setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
    setPopperElement: import("react").Dispatch<import("react").SetStateAction<HTMLInputElement | null | undefined>>;
    shouldDisableDate: (date: DateTime) => boolean;
    shouldDisableMonth: (date: DateTime) => boolean;
    shouldDisableYear: (date: DateTime) => boolean;
    toggleCalendarVisibility: () => void;
};
export {};
//# sourceMappingURL=useOdysseyDateFields.d.ts.map