"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get datePickerConfig () {
        return datePickerConfig;
    },
    get datePickerRoot () {
        return datePickerRoot;
    }
});
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
var _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
var _utils = require("../../../utils");
var _dateHelper = require("../utils/dateHelper");
var _useDatePicker = require("../hooks/useDatePicker");
var _DatePickertokens = require("../DatePicker.tokens");
var _DatePickerBasestyles = require("../DatePickerBase.styles");
var _useKeyboardNavigation = require("../hooks/useKeyboardNavigation");
var _utils1 = require("../utils");
var _ui = require("../ui");
var _base = require("./variations/_size/base");
var _base1 = require("./variations/_view/base");
var _base2 = require("./variations/_hint-view/base");
var _base3 = require("./variations/_hint-size/base");
var _base4 = require("./variations/_tooltip-size/base");
var _base5 = require("./variations/_disabled/base");
var _base6 = require("./variations/_readonly/base");
var _SingleDatestyles = require("./SingleDate.styles");
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys, key, i;
    if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
        sourceKeys = Reflect.ownKeys(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
        return target;
    }
    target = _object_without_properties_loose(source, excluded);
    if (Object.getOwnPropertySymbols) {
        sourceKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
    }
    return target;
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _to_array(arr) {
    return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
var datePickerRoot = function datePickerRoot(Root) {
    return /*#__PURE__*/ (0, _react.forwardRef)(function(_0, _1) {
        var _ref = [
            _0,
            _1
        ], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, name = _ref2.name, autoComplete = _ref2.autoComplete, // controlled
        outerValue = _ref2.value, outerOpened = _ref2.opened, _ref_defaultDate = _ref2.defaultDate, defaultDate = _ref_defaultDate === void 0 ? '' : _ref_defaultDate, preserveInvalidOnBlur = _ref2.preserveInvalidOnBlur, // variations
        view = _ref2.view, size = _ref2.size, _ref_readOnly = _ref2.readOnly, readOnly = _ref_readOnly === void 0 ? false : _ref_readOnly, _ref_disabled = _ref2.disabled, disabled = _ref_disabled === void 0 ? false : _ref_disabled, appearance = _ref2.appearance, hasClearDivider = _ref2.hasClearDivider, stretched = _ref2.stretched, valueError = _ref2.valueError, valueSuccess = _ref2.valueSuccess, // layout
        label = _ref2.label, _ref_labelPlacement = _ref2.labelPlacement, labelPlacement = _ref_labelPlacement === void 0 ? 'outer' : _ref_labelPlacement, keepPlaceholder = _ref2.keepPlaceholder, _ref_required = _ref2.required, required = _ref_required === void 0 ? false : _ref_required, _ref_requiredPlacement = _ref2.requiredPlacement, requiredPlacement = _ref_requiredPlacement === void 0 ? 'right' : _ref_requiredPlacement, _ref_hasRequiredIndicator = _ref2.hasRequiredIndicator, hasRequiredIndicator = _ref_hasRequiredIndicator === void 0 ? false : _ref_hasRequiredIndicator, placeholder = _ref2.placeholder, leftHelper = _ref2.leftHelper, contentLeft = _ref2.contentLeft, contentRight = _ref2.contentRight, textBefore = _ref2.textBefore, textAfter = _ref2.textAfter, _ref_hintTrigger = _ref2.// hint
        hintTrigger, hintTrigger = _ref_hintTrigger === void 0 ? 'hover' : _ref_hintTrigger, hintText = _ref2.hintText, _ref_hintView = _ref2.hintView, hintView = _ref_hintView === void 0 ? 'default' : _ref_hintView, _ref_hintSize = _ref2.hintSize, hintSize = _ref_hintSize === void 0 ? 'm' : _ref_hintSize, hintTargetIcon = _ref2.hintTargetIcon, _ref_hintTargetPlacement = _ref2.hintTargetPlacement, hintTargetPlacement = _ref_hintTargetPlacement === void 0 ? 'outer' : _ref_hintTargetPlacement, _ref_hintPlacement = _ref2.hintPlacement, hintPlacement = _ref_hintPlacement === void 0 ? 'auto' : _ref_hintPlacement, hintHasArrow = _ref2.hintHasArrow, _ref_hintOffset = _ref2.hintOffset, hintOffset = _ref_hintOffset === void 0 ? [
            0,
            0
        ] : _ref_hintOffset, hintWidth = _ref2.hintWidth, hintContentLeft = _ref2.hintContentLeft, _ref_frame = _ref2.// calendar-container
        frame, frame = _ref_frame === void 0 ? 'document' : _ref_frame, _ref_usePortal = _ref2.usePortal, usePortal = _ref_usePortal === void 0 ? false : _ref_usePortal, zIndex = _ref2.zIndex, _ref_placement = _ref2.placement, placement = _ref_placement === void 0 ? [
            'top',
            'bottom'
        ] : _ref_placement, _ref_closeOnOverlayClick = _ref2.closeOnOverlayClick, closeOnOverlayClick = _ref_closeOnOverlayClick === void 0 ? true : _ref_closeOnOverlayClick, _ref_closeOnEsc = _ref2.closeOnEsc, closeOnEsc = _ref_closeOnEsc === void 0 ? true : _ref_closeOnEsc, _ref_closeAfterDateSelect = _ref2.closeAfterDateSelect, closeAfterDateSelect = _ref_closeAfterDateSelect === void 0 ? true : _ref_closeAfterDateSelect, offset = _ref2.offset, _ref_format = _ref2.// calendar
        format, format = _ref_format === void 0 ? 'DD.MM.YYYY' : _ref_format, _ref_lang = _ref2.lang, lang = _ref_lang === void 0 ? 'ru' : _ref_lang, maskWithFormat = _ref2.maskWithFormat, min = _ref2.min, max = _ref2.max, renderFromDate = _ref2.renderFromDate, _ref_includeEdgeDates = _ref2.includeEdgeDates, includeEdgeDates = _ref_includeEdgeDates === void 0 ? false : _ref_includeEdgeDates, eventTooltipOptions = _ref2.eventTooltipOptions, eventList = _ref2.eventList, disabledList = _ref2.disabledList, eventMonthList = _ref2.eventMonthList, disabledMonthList = _ref2.disabledMonthList, eventQuarterList = _ref2.eventQuarterList, disabledQuarterList = _ref2.disabledQuarterList, eventYearList = _ref2.eventYearList, disabledYearList = _ref2.disabledYearList, _ref_type = _ref2.type, type = _ref_type === void 0 ? 'Days' : _ref_type, calendarContainerWidth = _ref2.calendarContainerWidth, calendarContainerHeight = _ref2.calendarContainerHeight, dateShortcuts = _ref2.dateShortcuts, _ref_dateShortcutsPlacement = _ref2.dateShortcutsPlacement, dateShortcutsPlacement = _ref_dateShortcutsPlacement === void 0 ? 'left' : _ref_dateShortcutsPlacement, dateShortcutsWidth = _ref2.dateShortcutsWidth, onChangeValue = _ref2.onChangeValue, onCommitDate = _ref2.onCommitDate, onToggle = _ref2.onToggle, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onChange = _ref2.onChange, rest = _object_without_properties(_ref2, [
            "className",
            "name",
            "autoComplete",
            "value",
            "opened",
            "defaultDate",
            "preserveInvalidOnBlur",
            "view",
            "size",
            "readOnly",
            "disabled",
            "appearance",
            "hasClearDivider",
            "stretched",
            "valueError",
            "valueSuccess",
            "label",
            "labelPlacement",
            "keepPlaceholder",
            "required",
            "requiredPlacement",
            "hasRequiredIndicator",
            "placeholder",
            "leftHelper",
            "contentLeft",
            "contentRight",
            "textBefore",
            "textAfter",
            "hintTrigger",
            "hintText",
            "hintView",
            "hintSize",
            "hintTargetIcon",
            "hintTargetPlacement",
            "hintPlacement",
            "hintHasArrow",
            "hintOffset",
            "hintWidth",
            "hintContentLeft",
            "frame",
            "usePortal",
            "zIndex",
            "placement",
            "closeOnOverlayClick",
            "closeOnEsc",
            "closeAfterDateSelect",
            "offset",
            "format",
            "lang",
            "maskWithFormat",
            "min",
            "max",
            "renderFromDate",
            "includeEdgeDates",
            "eventTooltipOptions",
            "eventList",
            "disabledList",
            "eventMonthList",
            "disabledMonthList",
            "eventQuarterList",
            "disabledQuarterList",
            "eventYearList",
            "disabledYearList",
            "type",
            "calendarContainerWidth",
            "calendarContainerHeight",
            "dateShortcuts",
            "dateShortcutsPlacement",
            "dateShortcutsWidth",
            "onChangeValue",
            "onCommitDate",
            "onToggle",
            "onFocus",
            "onBlur",
            "onChange"
        ]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
        var inputRef = (0, _react.useRef)(null);
        var innerRef = (0, _react.useRef)(null);
        var calendarRootRef = (0, _react.useRef)(null);
        var _useState = _sliced_to_array((0, _react.useState)(false), 2), isInnerOpen = _useState[0], setIsInnerOpen = _useState[1];
        var openedValue = outerOpened !== null && outerOpened !== void 0 ? outerOpened : isInnerOpen;
        var dateFormatDelimiter = (0, _dateHelper.getDateFormatDelimiter)(format);
        var _useState1 = _sliced_to_array((0, _react.useState)(defaultDate || ''), 2), innerDate = _useState1[0], setInnerDate = _useState1[1];
        var dateValue = outerValue !== null && outerValue !== void 0 ? outerValue : innerDate;
        var initialValues = (0, _utils1.getFormattedDates)({
            value: dateValue,
            delimiter: dateFormatDelimiter,
            lang: lang,
            format: format,
            includeEdgeDates: includeEdgeDates,
            min: min,
            max: max
        });
        var _useState2 = _sliced_to_array((0, _react.useState)({
            calendar: initialValues.originalDate,
            input: initialValues.formattedDate
        }), 2), correctDates = _useState2[0], setCorrectDates = _useState2[1];
        var calendarValue = initialValues.originalDate;
        var inputValue = initialValues.formattedDate;
        var calendarContainerWidthValue = calendarContainerWidth ? (0, _utils.getSizeValueFromProp)(calendarContainerWidth, 'rem') : undefined;
        var calendarContainerHeightValue = calendarContainerHeight ? (0, _utils.getSizeValueFromProp)(calendarContainerHeight, 'rem') : undefined;
        var _useDatePicker1 = (0, _useDatePicker.useDatePicker)({
            currentValue: inputValue,
            format: format,
            lang: lang,
            disabled: disabled,
            readOnly: readOnly,
            maskWithFormat: maskWithFormat,
            valueError: valueError,
            valueSuccess: valueSuccess,
            name: name,
            type: type,
            min: min,
            max: max,
            includeEdgeDates: includeEdgeDates,
            setCorrectDates: setCorrectDates,
            setInnerDate: setInnerDate,
            dateFormatDelimiter: dateFormatDelimiter,
            onChangeValue: onChangeValue,
            onCommitDate: onCommitDate,
            onChange: onChange
        }), datePickerErrorClass = _useDatePicker1.datePickerErrorClass, datePickerSuccessClass = _useDatePicker1.datePickerSuccessClass, handleChangeValue = _useDatePicker1.handleChangeValue, onCalendarPick = _useDatePicker1.handleCalendarPick, handleSearch = _useDatePicker1.handleSearch, getQuarterInfo = _useDatePicker1.getQuarterInfo, updateExternalDate = _useDatePicker1.updateExternalDate;
        var handleToggle = function handleToggle(innerOpened, event) {
            if (disabled || readOnly) {
                return;
            }
            var isCalendarOpen = (event === null || event === void 0 ? void 0 : event.target) === (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) && event.code !== _useKeyboardNavigation.keys.Escape ? true : innerOpened;
            if (onToggle) {
                onToggle(isCalendarOpen, event);
            }
            setIsInnerOpen(isCalendarOpen);
        };
        var handleCalendarRootClick = function handleCalendarRootClick(event) {
            if (disabled || readOnly) {
                return;
            }
            if (isInnerOpen && stretched && event.target === (calendarRootRef === null || calendarRootRef === void 0 ? void 0 : calendarRootRef.current)) {
                setIsInnerOpen(false);
                if (onToggle) {
                    onToggle(false, event);
                }
            }
        };
        var onKeyDown = (0, _useKeyboardNavigation.useKeyNavigation)({
            isCalendarOpen: isInnerOpen,
            format: format,
            maskWithFormat: maskWithFormat,
            delimiter: dateFormatDelimiter,
            closeOnEsc: closeOnEsc,
            onToggle: handleToggle
        }).onKeyDown;
        var handleBlur = function handleBlur(event) {
            if (!preserveInvalidOnBlur && !calendarValue && correctDates.calendar) {
                setInnerDate(new Date(correctDates.calendar));
                if (onChangeValue) {
                    onChangeValue(event, correctDates.input, correctDates.calendar, correctDates.calendar.toISOString());
                }
                if (onCommitDate) {
                    var dateInfo = getQuarterInfo(correctDates.calendar);
                    (0, _utils1.invokeOnCommitDate)({
                        callback: onCommitDate,
                        value: correctDates.input,
                        formattedValues: {
                            error: false,
                            success: true,
                            dateInfo: dateInfo,
                            originalDate: correctDates.calendar,
                            isoDate: correctDates.calendar.toISOString()
                        }
                    });
                }
                if (onChange) {
                    onChange({
                        target: {
                            value: correctDates.input,
                            originalDate: correctDates.calendar,
                            isoDate: correctDates.calendar.toISOString(),
                            name: name
                        }
                    });
                }
            }
            if (onBlur) {
                onBlur(event);
            }
        };
        var handleCalendarPick = function handleCalendarPick(date, dateInfo) {
            onCalendarPick(date, dateInfo);
            if (closeAfterDateSelect) {
                setIsInnerOpen(false);
                handleToggle(false);
            }
        };
        var DatePickerInput = /*#__PURE__*/ _react.default.createElement(_SingleDatestyles.StyledInput, _object_spread({
            ref: inputRef,
            className: (0, _classnames.default)(datePickerErrorClass, datePickerSuccessClass),
            value: inputValue,
            size: size,
            readOnly: readOnly,
            disabled: disabled,
            placeholder: placeholder,
            contentLeft: contentLeft,
            contentRight: contentRight,
            textBefore: textBefore,
            textAfter: textAfter,
            onChange: handleChangeValue,
            onSearch: handleSearch,
            onFocus: onFocus,
            onBlur: handleBlur,
            onKeyDown: onKeyDown,
            required: required,
            requiredPlacement: requiredPlacement,
            hasRequiredIndicator: hasRequiredIndicator,
            label: label,
            labelPlacement: labelPlacement,
            keepPlaceholder: keepPlaceholder,
            autoComplete: autoComplete,
            appearance: appearance,
            hasDivider: hasClearDivider
        }, hintText ? {
            hintText: hintText,
            hintView: hintView,
            hintSize: hintSize,
            hintTrigger: hintTrigger,
            hintTargetIcon: hintTargetIcon,
            hintPlacement: hintPlacement,
            hintHasArrow: hintHasArrow,
            hintOffset: hintOffset,
            hintWidth: hintWidth,
            hintContentLeft: hintContentLeft,
            hintTargetPlacement: hintTargetPlacement
        } : {
            hintText: undefined
        }));
        (0, _react.useLayoutEffect)(function() {
            if (!dateValue) {
                updateExternalDate(defaultDate);
            }
        }, [
            defaultDate,
            format,
            lang
        ]);
        return /*#__PURE__*/ _react.default.createElement(Root, _object_spread({
            view: view,
            size: size,
            className: (0, _classnames.default)(_DatePickertokens.classes.datePickerRoot, className, _define_property({}, _DatePickertokens.classes.datePickerstretched, stretched)),
            disabled: disabled,
            readOnly: !disabled && readOnly,
            ref: ref,
            eventTooltipSize: eventTooltipOptions === null || eventTooltipOptions === void 0 ? void 0 : eventTooltipOptions.size
        }, hintText && {
            hintView: hintView,
            hintSize: hintSize
        }, rest), /*#__PURE__*/ _react.default.createElement(_SingleDatestyles.StyledPopover, {
            opened: openedValue,
            usePortal: usePortal,
            frame: frame,
            onToggle: handleToggle,
            offset: offset,
            placement: (0, _utils.getPlacements)(placement, false),
            trigger: "click",
            closeOnOverlayClick: closeOnOverlayClick,
            isFocusTrapped: false,
            target: DatePickerInput,
            preventOverflow: false,
            zIndex: zIndex,
            innerWidth: calendarContainerWidthValue,
            innerHeight: calendarContainerHeightValue
        }, /*#__PURE__*/ _react.default.createElement(Root, {
            ref: calendarRootRef,
            view: view,
            size: size,
            className: (0, _classnames.default)(_DatePickertokens.classes.datePickerRoot, className, _define_property({}, _DatePickertokens.classes.datePickerstretched, stretched)),
            disabled: disabled,
            readOnly: !disabled && readOnly,
            onClick: handleCalendarRootClick
        }, (dateShortcuts === null || dateShortcuts === void 0 ? void 0 : dateShortcuts.length) ? /*#__PURE__*/ _react.default.createElement(_ui.StyledShortcutList, {
            items: dateShortcuts,
            setShortcutDate: onCalendarPick,
            dateShortcutsWidth: dateShortcutsWidth,
            calendarContainerHeight: calendarContainerHeight,
            dateShortcutsPlacement: dateShortcutsPlacement
        }) : null, /*#__PURE__*/ _react.default.createElement(_DatePickerBasestyles.StyledCalendar, {
            className: (0, _classnames.default)(_define_property({}, _DatePickertokens.classes.datePickerCalendarstretched, stretched)),
            innerWidth: calendarContainerWidthValue,
            innerHeight: calendarContainerHeightValue,
            size: size,
            value: calendarValue,
            type: type,
            eventTooltipOptions: eventTooltipOptions,
            eventList: eventList,
            disabledList: disabledList,
            eventMonthList: eventMonthList,
            disabledMonthList: disabledMonthList,
            eventQuarterList: eventQuarterList,
            disabledQuarterList: disabledQuarterList,
            eventYearList: eventYearList,
            disabledYearList: disabledYearList,
            min: min,
            max: max,
            renderFromDate: renderFromDate,
            includeEdgeDates: includeEdgeDates,
            isRange: false,
            locale: lang,
            onChangeValue: handleCalendarPick
        }))), leftHelper && /*#__PURE__*/ _react.default.createElement(_SingleDatestyles.LeftHelper, {
            className: (0, _classnames.default)(datePickerErrorClass, datePickerSuccessClass)
        }, leftHelper), /*#__PURE__*/ _react.default.createElement(_DatePickerBasestyles.InputHidden, _object_spread({
            type: "hidden",
            datatype: "datepicker-single",
            name: name,
            value: inputValue,
            ref: innerRef
        }, _utils.noop)));
    });
};
var datePickerConfig = {
    name: 'DatePicker',
    tag: 'div',
    layout: datePickerRoot,
    base: _SingleDatestyles.base,
    variations: {
        view: {
            css: _base1.base
        },
        size: {
            css: _base.base
        },
        eventTooltipSize: {
            css: _base4.base
        },
        hintView: {
            css: _base2.base
        },
        hintSize: {
            css: _base3.base
        },
        disabled: {
            css: _base5.base,
            attrs: true
        },
        readOnly: {
            css: _base6.base,
            attrs: true
        }
    },
    defaults: {
        size: 'm',
        view: 'default',
        eventTooltipSizeCSS: 'm'
    }
};
