import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
import { Dayjs } from 'dayjs';
import { PickerFieldUISlotProps, ExportedPickerFieldUIProps } from '@mui/x-date-pickers/internals';
import { TextFieldProps } from '@availity/mui-textfield';
import { TimePickerProps } from '@mui/x-date-pickers/TimePicker';

type AvTextFieldAdditionalProps = Pick<TextFieldProps, 'error' | 'helpTopicId' | 'helperText' | 'inputProps' | 'label' | 'required'>;

type DatepickerProps = {
    value?: Dayjs | null | undefined;
    /** Props applied to the `PickersTextField` component */
    FieldProps?: PickerFieldUISlotProps['textField'] & AvTextFieldAdditionalProps;
    /** Determines where the Calendar will be placed when opened.
     * @default bottom-start
     */
    placement?: 'bottom-start' | 'bottom' | 'bottom-end';
    /** Determines if the clear button appears in the action bar and input. _No custom onClear available_ */
    clearable?: boolean;
} & Omit<DatePickerProps<false>, 'components' | 'componentsProps' | 'desktopModeMediaQuery' | 'DialogProps' | 'OpenPickerButtonProps' | 'openTo' | 'orientation' | 'PaperProps' | 'PopperProps' | 'reduceAnimations' | 'renderInput' | 'rifmFormatter' | 'showToolbar' | 'slots' | 'slotProps' | 'ToolbarComponent' | 'toolbarFormat' | 'toolbarPlaceholder' | 'toolbarTitle' | 'TransitionComponent' | 'value'>;
declare const Datepicker: ({ FieldProps, placement, clearable, ...props }: DatepickerProps) => React.JSX.Element;

type TimepickerProps = {
    value?: Dayjs | null | undefined;
    /** Props applied to the `PickersTextField` component */
    FieldProps?: PickerFieldUISlotProps['textField'] & AvTextFieldAdditionalProps;
    /** Determines where the Calendar will be placed when opened.
     * @default bottom-start
     */
    placement?: 'bottom-start' | 'bottom' | 'bottom-end';
} & Pick<ExportedPickerFieldUIProps, 'onClear' | 'clearable'> & Omit<TimePickerProps<false>, 'components' | 'componentsProps' | 'desktopModeMediaQuery' | 'DialogProps' | 'disableOpenPicker' | 'enableAccessibleFieldDOMStructure' | 'OpenPickerButtonProps' | 'openTo' | 'orientation' | 'PaperProps' | 'PopperProps' | 'reduceAnimations' | 'renderInput' | 'rifmFormatter' | 'showToolbar' | 'slots' | 'slotProps' | 'ToolbarComponent' | 'toolbarFormat' | 'toolbarPlaceholder' | 'toolbarTitle' | 'TransitionComponent' | 'value'>;
declare const Timepicker: ({ FieldProps, placement, clearable, onClear, ...props }: TimepickerProps) => React.JSX.Element;

export { Datepicker, type DatepickerProps, Timepicker, type TimepickerProps };
