"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;
    }
});
const _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
const _Popover = require("../../../Popover");
const _mixins = require("../../../../mixins");
const _Calendartokens = require("../../Calendar.tokens");
const _mixins1 = require("../../mixins");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const inRange = ()=>`
    &:before {
        content: '';
        z-index: -1;
        position: absolute;
        width: 100%;
        height: calc(100% - 0.125rem);
        background: var(${_Calendartokens.tokens.calendarRangeBackground});
    }
`;
const sideInRange = ()=>`
    &:before {
        content: '';
        z-index: -1;
        position: absolute;
        width: 0.75rem;
        height: calc(100% - 0.125rem);
        background: var(${_Calendartokens.tokens.calendarRangeBackground});
    }
`;
const StyledItem = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1ukg3du0",
    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:", ({ offset })=>`${offset}px`, ";}}&.", String(_Calendartokens.classes.sideRight), "{&:before{right:", ({ offset })=>`${offset}px`, ";}}");
const disabledItem = ()=>`
    cursor: not-allowed;
    opacity: var(${_Calendartokens.tokens.calendarDisabledOpacity});
`;
const disabledCurrentItem = ()=>`
    ${disabledItem()};
`;
const StyledItemRoot = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1ukg3du1",
    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:", ({ isDayInCurrentMonth })=>isDayInCurrentMonth ? `var(${_Calendartokens.tokens.calendarContentPrimaryColor})` : `var(${_Calendartokens.tokens.calendarContentSecondaryColor})`, ";&.", String(_Calendartokens.classes.selectableItem), "{", (0, _mixins1.addSelected)({
    minWidth: 'calc(100% - 0.125rem)',
    minHeight: 'calc(100% - 0.125rem)',
    selectedFontWeight: `var(${_Calendartokens.innerTokens.dateStructureSelectedFontWeight})`,
    selectedBackground: `var(${_Calendartokens.tokens.calendarSelectedItemBackground})`,
    selectedColor: `var(${_Calendartokens.tokens.calendarSelectedItemColor})`,
    selectableBackgroundHover: `var(${_Calendartokens.tokens.calendarSelectableItemBackgroundHover})`,
    currentBorderColor: `var(${_Calendartokens.tokens.calendarCurrentItemBorderColor})`,
    currentBorderWidth: `var(${_Calendartokens.tokens.calendarCurrentItemBorderWidth})`,
    activeBackground: `var(${_Calendartokens.tokens.calendarActiveItemBackground})`,
    activeColor: `var(${_Calendartokens.tokens.calendarActiveItemColor})`
}), ";", (0, _mixins.addFocus)({
    outlineSize: '0.063rem',
    outlineOffset: '0.125rem',
    outlineColor: `var(${_Calendartokens.tokens.calendarOutlineFocusColor})`,
    outlineRadius: `var(${_Calendartokens.innerTokens.dateStructureBorderRadius})`
}), ";&.", _Calendartokens.classes.currentItem, "{", (0, _mixins.addFocus)({
    outlineSize: '0.063rem',
    outlineOffset: '0.1875rem',
    outlineColor: `var(${_Calendartokens.tokens.calendarOutlineFocusColor})`,
    outlineRadius: `var(${_Calendartokens.innerTokens.dateStructureBorderRadius})`
}), ";}}&.", _Calendartokens.classes.dayInCurrentMonth, ":not(.", _Calendartokens.classes.disabled, "){", (0, _mixins1.addActive)({
    activeBackground: `var(${_Calendartokens.tokens.calendarActiveItemBackground})`,
    activeColor: `var(${_Calendartokens.tokens.calendarActiveItemColor})`,
    activeFontWeight: `var(${_Calendartokens.innerTokens.dateStructureSelectedFontWeight})`
}), ";}&.", _Calendartokens.classes.dayOfWeek, "{color:var(", _Calendartokens.tokens.calendarDayOfWeekColor, ");}&.", _Calendartokens.classes.disabled, "{color:", ({ isDayInCurrentMonth })=>isDayInCurrentMonth ? `var(${_Calendartokens.tokens.calendarContentPrimaryDisabledColor})` : `var(${_Calendartokens.tokens.calendarContentSecondaryDisabledColor})`, ";", disabledItem(), ";}&.", _Calendartokens.classes.disabledCurrent, "{color:", ({ isDayInCurrentMonth })=>isDayInCurrentMonth ? `var(${_Calendartokens.tokens.calendarContentPrimaryDisabledColor})` : `var(${_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%;}");
const StyledEvents = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1ukg3du2",
    label: "StyledEvents"
})("display:flex;position:absolute;bottom:var(", _Calendartokens.tokens.calendarEventItemBottom, ",0.25rem);");
const StyledEvent = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1ukg3du3",
    label: "StyledEvent"
})("margin:0 0.063rem;width:0.188rem;height:0.188rem;border-radius:50%;background-color:", ({ color = 'var(--plasma-colors-accent, var(--surface-accent))' })=>color, ";");
