import { __assign, __rest } from "tslib";
import React, { forwardRef } from "react";
import P2 from "../typography/P2";
import { DateBoxWrapper } from "./style";
var DateBox = forwardRef(function (_a, ref) {
    var children = _a.children, viewType = _a.viewType, isDisabled = _a.isDisabled, className = _a.className, onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? "l" : _b, props = __rest(_a, ["children", "viewType", "isDisabled", "className", "onClick", "size"]);
    var handleClick = function (event) {
        onClick && !isDisabled && onClick(event);
    };
    return (React.createElement(DateBoxWrapper, __assign({ className: className, viewType: viewType, disabled: isDisabled, onClick: handleClick, size: size, ref: ref }, props),
        React.createElement(P2, { type: viewType === "current" ? "pavo" : "cetus" }, children)));
});
DateBox.displayName = "DateBox";
export default DateBox;
