(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "react", "../typography/P2", "./style"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var tslib_1 = require("tslib");
    var react_1 = (0, tslib_1.__importStar)(require("react"));
    var P2_1 = (0, tslib_1.__importDefault)(require("../typography/P2"));
    var style_1 = require("./style");
    var DateBox = (0, react_1.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 = (0, tslib_1.__rest)(_a, ["children", "viewType", "isDisabled", "className", "onClick", "size"]);
        var handleClick = function (event) {
            onClick && !isDisabled && onClick(event);
        };
        return (react_1.default.createElement(style_1.DateBoxWrapper, (0, tslib_1.__assign)({ className: className, viewType: viewType, disabled: isDisabled, onClick: handleClick, size: size, ref: ref }, props),
            react_1.default.createElement(P2_1.default, { type: viewType === "current" ? "pavo" : "cetus" }, children)));
    });
    DateBox.displayName = "DateBox";
    exports.default = DateBox;
});
