"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 StyledEvent () {
        return StyledEvent;
    },
    get StyledEvents () {
        return StyledEvents;
    },
    get StyledItem () {
        return StyledItem;
    },
    get StyledItemRoot () {
        return StyledItemRoot;
    }
});
var _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
var _Popover = require("../../../Popover");
var _mixins = require("../../../../mixins");
var _Calendartokens = require("../../Calendar.tokens");
var _mixins1 = require("../../mixins");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
var inRange = function inRange() {
    return "\n    &:before {\n        content: '';\n        z-index: -1;\n        position: absolute;\n        width: 100%;\n        height: calc(100% - 0.125rem);\n        background: var(".concat(_Calendartokens.tokens.calendarRangeBackground, ");\n    }\n");
};
var sideInRange = function sideInRange() {
    return "\n    &:before {\n        content: '';\n        z-index: -1;\n        position: absolute;\n        width: 0.75rem;\n        height: calc(100% - 0.125rem);\n        background: var(".concat(_Calendartokens.tokens.calendarRangeBackground, ");\n    }\n");
};
var StyledItem = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1rge0is0",
    label: "StyledItem"
})("border-radius:calc(var(", _Calendartokens.innerTokens.dateStructureBorderRadius, ") - 0.125rem);", String(_mixins1.flexCenter), ";&.", String(_Calendartokens.classes.inRange), "{", inRange(), ";}&.", String(_Calendartokens.classes.sideInRange), "{", sideInRange(), ";}&.", String(_Calendartokens.classes.sideLeft), "{&:before{left:", function(param) {
    var offset = param.offset;
    return "".concat(offset, "px");
}, ";}}&.", String(_Calendartokens.classes.sideRight), "{&:before{right:", function(param) {
    var offset = param.offset;
    return "".concat(offset, "px");
}, ";}}");
var disabledItem = function disabledItem() {
    return "\n    cursor: not-allowed;\n    opacity: var(".concat(_Calendartokens.tokens.calendarDisabledOpacity, ");\n");
};
var disabledCurrentItem = function disabledCurrentItem() {
    return "\n    ".concat(disabledItem(), ";\n");
};
var StyledItemRoot = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1rge0is1",
    label: "StyledItemRoot"
})("font-family:var(", _Calendartokens.innerTokens.dateStructureFontFamily, ");font-size:var(", _Calendartokens.innerTokens.dateStructureFontSize, ");font-style:var(", _Calendartokens.innerTokens.dateStructureFontStyle, ");font-weight:var(", _Calendartokens.innerTokens.dateStructureFontWeight, ");letter-spacing:var(", _Calendartokens.innerTokens.dateStructureFontLetterSpacing, ");line-height:var(", _Calendartokens.innerTokens.dateStructureFontLineHeight, ");position:relative;box-sizing:border-box;border-radius:var(", _Calendartokens.innerTokens.dateStructureBorderRadius, ");", String(_mixins1.flexCenter), ";color:", function(param) {
    var isDayInCurrentMonth = param.isDayInCurrentMonth;
    return isDayInCurrentMonth ? "var(".concat(_Calendartokens.tokens.calendarContentPrimaryColor, ")") : "var(".concat(_Calendartokens.tokens.calendarContentSecondaryColor, ")");
}, ";&.", String(_Calendartokens.classes.selectableItem), "{", (0, _mixins1.addSelected)({
    minWidth: 'calc(100% - 0.125rem)',
    minHeight: 'calc(100% - 0.125rem)',
    selectedFontWeight: "var(".concat(_Calendartokens.innerTokens.dateStructureSelectedFontWeight, ")"),
    selectedBackground: "var(".concat(_Calendartokens.tokens.calendarSelectedItemBackground, ")"),
    selectedColor: "var(".concat(_Calendartokens.tokens.calendarSelectedItemColor, ")"),
    selectableBackgroundHover: "var(".concat(_Calendartokens.tokens.calendarSelectableItemBackgroundHover, ")"),
    currentBorderColor: "var(".concat(_Calendartokens.tokens.calendarCurrentItemBorderColor, ")"),
    currentBorderWidth: "var(".concat(_Calendartokens.tokens.calendarCurrentItemBorderWidth, ")"),
    activeBackground: "var(".concat(_Calendartokens.tokens.calendarActiveItemBackground, ")"),
    activeColor: "var(".concat(_Calendartokens.tokens.calendarActiveItemColor, ")")
}), ";", (0, _mixins.addFocus)({
    outlineSize: '0.063rem',
    outlineOffset: '-0.125rem',
    outlineColor: "var(".concat(_Calendartokens.tokens.calendarOutlineFocusColor, ")"),
    outlineRadius: "calc(var(".concat(_Calendartokens.innerTokens.dateStructureBorderRadius, ") + 0.125rem)")
}), ";&.", _Calendartokens.classes.currentItem, "{", (0, _mixins.addFocus)({
    outlineSize: '0.063rem',
    outlineOffset: '-0.1875rem',
    outlineColor: "var(".concat(_Calendartokens.tokens.calendarOutlineFocusColor, ")"),
    outlineRadius: "calc(var(".concat(_Calendartokens.innerTokens.dateStructureBorderRadius, ") + 0.125rem)")
}), ";}}&.", _Calendartokens.classes.dayInCurrentMonth, ":not(.", _Calendartokens.classes.disabled, "){", (0, _mixins1.addActive)({
    activeBackground: "var(".concat(_Calendartokens.tokens.calendarActiveItemBackground, ")"),
    activeColor: "var(".concat(_Calendartokens.tokens.calendarActiveItemColor, ")"),
    activeFontWeight: "var(".concat(_Calendartokens.innerTokens.dateStructureSelectedFontWeight, ")")
}), ";}&.", _Calendartokens.classes.dayOfWeek, "{color:var(", _Calendartokens.tokens.calendarDayOfWeekColor, ");}&.", _Calendartokens.classes.disabled, "{color:", function(param) {
    var isDayInCurrentMonth = param.isDayInCurrentMonth;
    return isDayInCurrentMonth ? "var(".concat(_Calendartokens.tokens.calendarContentPrimaryDisabledColor, ")") : "var(".concat(_Calendartokens.tokens.calendarContentSecondaryDisabledColor, ")");
}, ";", disabledItem(), ";}&.", _Calendartokens.classes.disabledCurrent, "{color:", function(param) {
    var isDayInCurrentMonth = param.isDayInCurrentMonth;
    return isDayInCurrentMonth ? "var(".concat(_Calendartokens.tokens.calendarContentPrimaryDisabledColor, ")") : "var(".concat(_Calendartokens.tokens.calendarContentSecondaryDisabledColor, ")");
}, ";", disabledCurrentItem(), ";}&.", _Calendartokens.classes.currentItem, "{& > .", _Calendartokens.classes.inRange, ":before{width:calc(100% + 2px);height:100%;}& > .", _Calendartokens.classes.sideRight, ":before{width:100%;right:-1px;left:unset;}& > .", _Calendartokens.classes.sideLeft, ":before{width:100%;left:-1px;right:unset;}}& .", _Popover.popoverClasses.wrapper, ".", _Popover.popoverClasses.targetAsRef, "{z-index:-1;width:100%;}");
var StyledEvents = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1rge0is2",
    label: "StyledEvents"
})("display:flex;position:absolute;bottom:var(", _Calendartokens.tokens.calendarEventItemBottom, ",0.25rem);");
var StyledEvent = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1rge0is3",
    label: "StyledEvent"
})("margin:0 0.063rem;width:0.188rem;height:0.188rem;border-radius:50%;background-color:", function(param) {
    var _param_color = param.color, color = _param_color === void 0 ? 'var(--plasma-colors-accent, var(--surface-accent))' : _param_color;
    return color;
}, ";");
