"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 DisclosureIconWrapper () {
        return DisclosureIconWrapper;
    },
    get IconWrapper () {
        return IconWrapper;
    },
    get StyledArrow () {
        return StyledArrow;
    },
    get StyledCell () {
        return StyledCell;
    },
    get StyledCheckbox () {
        return StyledCheckbox;
    },
    get StyledCheckboxWrapper () {
        return StyledCheckboxWrapper;
    },
    get StyledIconDone () {
        return StyledIconDone;
    },
    get StyledIndicator () {
        return StyledIndicator;
    },
    get StyledText () {
        return StyledText;
    },
    get Wrapper () {
        return Wrapper;
    },
    get sizeMap () {
        return sizeMap;
    }
});
const _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
const _mixins = require("../../../../../../mixins");
const _engines = require("../../../../../../engines");
const _Selecttokens = require("../../../../Select.tokens");
const _Checkbox = require("../../../../../Checkbox");
const _Cell = require("../../../../../Cell");
const _Indicator = require("../../../../../Indicator");
const _Icon = require("../../../../../_Icon");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const mergedCheckboxConfig = (0, _engines.mergeConfig)(_Checkbox.checkboxConfig);
const Checkbox = (0, _engines.component)(mergedCheckboxConfig);
const mergedCellConfig = (0, _engines.mergeConfig)(_Cell.cellConfig);
const Cell = (0, _engines.component)(mergedCellConfig);
const mergedIndicatorConfig = (0, _engines.mergeConfig)(_Indicator.indicatorConfig);
const Indicator = (0, _engines.component)(mergedIndicatorConfig);
const StyledCell = /*#__PURE__*/ (0, _styled.default)(Cell, {
    target: "e1i7rt7e0",
    label: "StyledCell"
})(_Cell.cellTokens.cellTitleColor, ":var(", _Selecttokens.constants.cellTitleColor, ");", _Cell.cellTokens.cellBackgroundColor, ":var(", _Selecttokens.constants.cellBackgroundColor, ");", _Cell.cellTokens.cellPadding, ":var(", _Selecttokens.tokens.cellPadding, ");", _Cell.cellTokens.cellPaddingLeftContent, ":var(", _Selecttokens.tokens.cellPaddingLeftContent, ");", _Cell.cellTokens.cellPaddingContent, ":var(", _Selecttokens.tokens.cellPaddingContent, ");", _Cell.cellTokens.cellPaddingRightContent, ":var(", _Selecttokens.tokens.cellPaddingRightContent, ");", _Cell.cellTokens.cellTextboxGap, ":var(", _Selecttokens.tokens.cellTextboxGap, ");", _Cell.cellTokens.cellGap, ":var(", _Selecttokens.tokens.cellGap, ");", _Cell.cellTokens.cellTitleFontFamily, ":var(", _Selecttokens.tokens.cellTitleFontFamily, ");", _Cell.cellTokens.cellTitleFontSize, ":var(", _Selecttokens.tokens.cellTitleFontSize, ");", _Cell.cellTokens.cellTitleFontStyle, ":var(", _Selecttokens.tokens.cellTitleFontStyle, ");", _Cell.cellTokens.cellTitleFontWeight, ":var(", _Selecttokens.tokens.cellTitleFontWeight, ");", _Cell.cellTokens.cellTitleLetterSpacing, ":var(", _Selecttokens.tokens.cellTitleLetterSpacing, ");", _Cell.cellTokens.cellTitleLineHeight, ":var(", _Selecttokens.tokens.cellTitleLineHeight, ");flex:1;min-width:0;& *{min-width:0;}&.", _Selecttokens.classes.singleLineMode, " .cell-textbox-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}");
const StyledCheckbox = /*#__PURE__*/ (0, _styled.default)(Checkbox, {
    target: "e1i7rt7e1",
    label: "StyledCheckbox"
})(_Checkbox.checkboxTokens.triggerSize, ":var(", _Selecttokens.tokens.checkboxTriggerSize, ");", _Checkbox.checkboxTokens.triggerBorderRadius, ":var(", _Selecttokens.tokens.checkboxTriggerBorderRadius, ");", _Checkbox.checkboxTokens.fillColor, ":var(", _Selecttokens.tokens.checkboxFillColor, ");", _Checkbox.checkboxTokens.iconColor, ":var(", _Selecttokens.tokens.checkboxIconColor, ");", _Checkbox.checkboxTokens.triggerBorderWidth, ":var(", _Selecttokens.tokens.checkboxTriggerBorderWidth, ");", _Checkbox.checkboxTokens.triggerBorderColor, ":var(", _Selecttokens.tokens.checkboxTriggerBorderColor, ");", _Checkbox.checkboxTokens.triggerBorderCheckedColor, ":var(", _Selecttokens.tokens.checkboxTriggerBorderCheckedColor, ");");
const StyledIndicator = /*#__PURE__*/ (0, _styled.default)(Indicator, {
    target: "e1i7rt7e2",
    label: "StyledIndicator"
})(_Indicator.indicatorTokens.size, ":var(", _Selecttokens.tokens.indicatorSize, ");", _Indicator.indicatorTokens.color, ":var(", _Selecttokens.tokens.itemIconColor, ");");
const sizeMap = {
    xs: '1rem',
    s: '1.5rem'
};
const StyledArrow = /*#__PURE__*/ (0, _styled.default)(_Icon.IconDisclosureRightCentered, {
    target: "e1i7rt7e3",
    label: "StyledArrow"
})("width:", ({ size = 'xs' })=>`var(${_Selecttokens.tokens.disclosureIconSize}, ${sizeMap[size]})`, ";height:", ({ size = 'xs' })=>`var(${_Selecttokens.tokens.disclosureIconSize}, ${sizeMap[size]})`, ";");
const StyledIconDone = /*#__PURE__*/ (0, _styled.default)(_Icon.IconDone, {
    target: "e1i7rt7e4",
    label: "StyledIconDone"
})("width:", ({ size = 'xs' })=>`var(${_Selecttokens.tokens.disclosureIconSize}, ${sizeMap[size]})`, ";height:", ({ size = 'xs' })=>`var(${_Selecttokens.tokens.disclosureIconSize}, ${sizeMap[size]})`, ";");
const DisclosureIconWrapper = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1i7rt7e5",
    label: "DisclosureIconWrapper"
})("margin:var(", _Selecttokens.tokens.disclosureIconMargin, ");line-height:0;color:var(", _Selecttokens.tokens.disclosureNestedIconColor, ",var(", _Selecttokens.tokens.disclosureIconColor, "));&:hover{color:var(", _Selecttokens.tokens.disclosureNestedIconColorHover, ",var(", _Selecttokens.tokens.disclosureIconColorHover, "));}");
const IconWrapper = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1i7rt7e6",
    label: "IconWrapper"
})("display:flex;align-items:center;justify-content:center;flex:none;width:", ({ variant })=>`var(${variant === 'tight' ? _Selecttokens.tokens.itemIconSizeTight : _Selecttokens.tokens.itemIconSize})`, ";height:", ({ variant })=>`var(${variant === 'tight' ? _Selecttokens.tokens.itemIconSizeTight : _Selecttokens.tokens.itemIconSize})`, ";margin:var(", _Selecttokens.tokens.itemIconMargin, ");line-height:0;color:var(", _Selecttokens.tokens.itemIconColor, ");");
const StyledText = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e1i7rt7e7",
    label: "StyledText"
})((0, _mixins.applyEllipsis)(), ";flex:1;");
const Wrapper = (0, /*#__PURE__*/ _styled.default)("li", {
    target: "e1i7rt7e8",
    label: "Wrapper"
})("display:flex;align-items:center;min-height:var(", _Selecttokens.tokens.itemHeight, ");margin:0;box-sizing:content-box;padding:", ({ variant })=>`var(${variant === 'tight' ? _Selecttokens.tokens.itemPaddingTight : _Selecttokens.tokens.itemPadding})`, ";font-family:var(", _Selecttokens.tokens.fontFamily, ");font-size:var(", _Selecttokens.tokens.fontSize, ");font-style:var(", _Selecttokens.tokens.fontStyle, ");font-weight:var(", _Selecttokens.tokens.fontWeight, ");letter-spacing:var(", _Selecttokens.tokens.fontLetterSpacing, ");line-height:var(", _Selecttokens.tokens.fontLineHeight, ");background-color:var(", _Selecttokens.constants.itemBackground, ");color:var(--text-primary);border-radius:calc(var(", _Selecttokens.tokens.borderRadius, ") - 0.125rem - var(", _Selecttokens.tokens.dropdownBorderWidth, ",0rem));user-select:none;background-clip:padding-box;&:hover:not(.", _Selecttokens.classes.dropdownItemIsDisabled, "){cursor:pointer;background-color:var(", _Selecttokens.tokens.itemBackgroundHover, ");}&.", _Selecttokens.classes.dropdownItemIsActive, "{background-color:var(", _Selecttokens.tokens.itemBackgroundHover, ");}&.", _Selecttokens.classes.dropdownItemIsDisabled, "{opacity:", _Selecttokens.constants.opacity, ";cursor:not-allowed;}:focus{outline:none;}", (0, _mixins.addFocus)({
    outlineSize: '0',
    outlineOffset: '0',
    outlineColor: `var(${_Selecttokens.constants.focusColor})`,
    outlineRadius: `calc(var(${_Selecttokens.tokens.borderRadius}) - 0.125rem - var(${_Selecttokens.tokens.dropdownBorderWidth}, 0rem))`,
    hasTransition: false,
    customFocusRules: `
            &.${_Selecttokens.classes.dropdownItemIsFocused}:before {
                outline: none;
                box-shadow: inset 0 0 0 0.0625rem var(${_Selecttokens.constants.focusColor});
            }
        `
}), ";");
const StyledCheckboxWrapper = (0, /*#__PURE__*/ _styled.default)("span", {
    target: "e1i7rt7e9",
    label: "StyledCheckboxWrapper"
})();
