"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 _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
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 = _styledcomponents.default.div.withConfig({
    displayName: "DateStructureItem.styles__StyledItem",
    componentId: "sc-74a7c0c6-0"
})([
    `border-radius:calc(var(`,
    `) - 0.125rem);`,
    `;&.`,
    `{`,
    `;}&.`,
    `{`,
    `;}&.`,
    `{&:before{left:`,
    `;}}&.`,
    `{&:before{right:`,
    `;}}`
], _Calendartokens.innerTokens.dateStructureBorderRadius, String(_mixins1.flexCenter), String(_Calendartokens.classes.inRange), inRange(), String(_Calendartokens.classes.sideInRange), sideInRange(), String(_Calendartokens.classes.sideLeft), ({ offset })=>`${offset}px`, String(_Calendartokens.classes.sideRight), ({ offset })=>`${offset}px`);
const disabledItem = ()=>`
    cursor: not-allowed;
    opacity: var(${_Calendartokens.tokens.calendarDisabledOpacity});
`;
const disabledCurrentItem = ()=>`
    ${disabledItem()};
`;
const StyledItemRoot = _styledcomponents.default.div.withConfig({
    displayName: "DateStructureItem.styles__StyledItemRoot",
    componentId: "sc-74a7c0c6-1"
})([
    `font-family:var(`,
    `);font-size:var(`,
    `);font-style:var(`,
    `);font-weight:var(`,
    `);letter-spacing:var(`,
    `);line-height:var(`,
    `);position:relative;box-sizing:border-box;border-radius:var(`,
    `);`,
    `;color:`,
    `;&.`,
    `{`,
    `;`,
    `;&.`,
    `{`,
    `;}}&.`,
    `:not(.`,
    `){`,
    `;}&.`,
    `{color:var(`,
    `);}&.`,
    `{color:`,
    `;`,
    `;}&.`,
    `{color:`,
    `;`,
    `;}&.`,
    `{& > .`,
    `:before{width:calc(100% + 2px);height:100%;}& > .`,
    `:before{width:100%;right:-1px;left:unset;}& > .`,
    `:before{width:100%;left:-1px;right:unset;}}& .`,
    `.`,
    `{z-index:-1;width:100%;}`
], _Calendartokens.innerTokens.dateStructureFontFamily, _Calendartokens.innerTokens.dateStructureFontSize, _Calendartokens.innerTokens.dateStructureFontStyle, _Calendartokens.innerTokens.dateStructureFontWeight, _Calendartokens.innerTokens.dateStructureFontLetterSpacing, _Calendartokens.innerTokens.dateStructureFontLineHeight, _Calendartokens.innerTokens.dateStructureBorderRadius, String(_mixins1.flexCenter), ({ 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, _Calendartokens.classes.disabled, (0, _mixins1.addActive)({
    activeBackground: `var(${_Calendartokens.tokens.calendarActiveItemBackground})`,
    activeColor: `var(${_Calendartokens.tokens.calendarActiveItemColor})`,
    activeFontWeight: `var(${_Calendartokens.innerTokens.dateStructureSelectedFontWeight})`
}), _Calendartokens.classes.dayOfWeek, _Calendartokens.tokens.calendarDayOfWeekColor, _Calendartokens.classes.disabled, ({ isDayInCurrentMonth })=>isDayInCurrentMonth ? `var(${_Calendartokens.tokens.calendarContentPrimaryDisabledColor})` : `var(${_Calendartokens.tokens.calendarContentSecondaryDisabledColor})`, disabledItem(), _Calendartokens.classes.disabledCurrent, ({ isDayInCurrentMonth })=>isDayInCurrentMonth ? `var(${_Calendartokens.tokens.calendarContentPrimaryDisabledColor})` : `var(${_Calendartokens.tokens.calendarContentSecondaryDisabledColor})`, disabledCurrentItem(), _Calendartokens.classes.currentItem, _Calendartokens.classes.inRange, _Calendartokens.classes.sideRight, _Calendartokens.classes.sideLeft, _Popover.popoverClasses.wrapper, _Popover.popoverClasses.targetAsRef);
const StyledEvents = _styledcomponents.default.div.withConfig({
    displayName: "DateStructureItem.styles__StyledEvents",
    componentId: "sc-74a7c0c6-2"
})([
    `display:flex;position:absolute;bottom:var(`,
    `,0.25rem);`
], _Calendartokens.tokens.calendarEventItemBottom);
const StyledEvent = _styledcomponents.default.div.withConfig({
    displayName: "DateStructureItem.styles__StyledEvent",
    componentId: "sc-74a7c0c6-3"
})([
    `margin:0 0.063rem;width:0.188rem;height:0.188rem;border-radius:50%;background-color:`,
    `;`
], ({ color = 'var(--plasma-colors-accent, var(--surface-accent))' })=>color);
