"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 IconArrowWrapper () {
        return IconArrowWrapper;
    },
    get ListWrapper () {
        return ListWrapper;
    },
    get StyledArrow () {
        return StyledArrow;
    },
    get StyledEmptyState () {
        return StyledEmptyState;
    },
    get StyledLeftHelper () {
        return StyledLeftHelper;
    },
    get Ul () {
        return Ul;
    },
    get base () {
        return base;
    },
    get sizeMap () {
        return sizeMap;
    }
});
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
const _engines = require("../../engines");
const _EmptyState = require("../EmptyState");
const _Icon = require("../_Icon");
const _Comboboxtokens = require("./Combobox.tokens");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const mergedConfig = (0, _engines.mergeConfig)(_EmptyState.emptyStateConfig);
const EmptyState = (0, _engines.component)(mergedConfig);
const ListWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Combobox.styles__ListWrapper",
    componentId: "sc-638e27f3-0"
})([
    `width:`,
    `;padding:calc(var(`,
    `) + var(`,
    `,0rem));border-radius:var(`,
    `);box-sizing:border-box;background:var(`,
    `);box-shadow:`,
    `,inset 0 0 0 var(`,
    `,0rem) var(`,
    `,transparent);`
], ({ listWidth })=>listWidth || '100%', _Comboboxtokens.tokens.padding, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.tokens.borderRadius, _Comboboxtokens.constants.background, _Comboboxtokens.constants.boxShadow, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.tokens.dropdownBorderColor);
const Ul = _styledcomponents.default.ul.withConfig({
    displayName: "Combobox.styles__Ul",
    componentId: "sc-638e27f3-1"
})([
    `max-height:`,
    `;overflow-x:hidden;overflow-y:`,
    `;border-radius:calc(var(`,
    `) - 0.125rem - var(`,
    `,0rem));margin:0;padding:0;.`,
    `{box-shadow:none;}`
], ({ virtual, listMaxHeight })=>virtual ? 'auto' : listMaxHeight || 'auto', ({ virtual })=>virtual ? 'visible' : 'auto', _Comboboxtokens.tokens.borderRadius, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.classes.emptyStateWrapper);
const IconArrowWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Combobox.styles__IconArrowWrapper",
    componentId: "sc-638e27f3-2"
})([
    `line-height:0;color:var(`,
    `);cursor:`,
    `;.`,
    `{transform:rotate(-180deg);}&:hover,&:active{color:`,
    `;}`
], _Comboboxtokens.tokens.disclosureIconColor, ({ disabled, readOnly })=>disabled || readOnly ? 'inherit' : 'pointer', _Comboboxtokens.classes.arrowInverse, ({ disabled, readOnly })=>disabled || readOnly ? `var(${_Comboboxtokens.tokens.disclosureIconColor})` : `var(${_Comboboxtokens.tokens.disclosureIconColorHover})`);
const sizeMap = {
    xs: '1rem',
    s: '1.5rem'
};
const StyledArrow = (0, _styledcomponents.default)(_Icon.IconDisclosureDownCentered).withConfig({
    displayName: "Combobox.styles__StyledArrow",
    componentId: "sc-638e27f3-3"
})([
    `width:`,
    `;height:`,
    `;`
], ({ size = 'xs' })=>`var(${_Comboboxtokens.tokens.disclosureIconSize}, ${sizeMap[size]})`, ({ size = 'xs' })=>`var(${_Comboboxtokens.tokens.disclosureIconSize}, ${sizeMap[size]})`);
const base = (0, _styledcomponents.css)([
    ``
]);
const StyledEmptyState = (0, _styledcomponents.default)(EmptyState).withConfig({
    displayName: "Combobox.styles__StyledEmptyState",
    componentId: "sc-638e27f3-4"
})([
    ``,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`
], _EmptyState.emptyStateTokens.borderRadius, _Comboboxtokens.tokens.textFieldBorderRadius, _EmptyState.emptyStateTokens.padding, _Comboboxtokens.tokens.emptyStatePadding, _EmptyState.emptyStateTokens.fontFamily, _Comboboxtokens.tokens.textFieldFontFamily, _EmptyState.emptyStateTokens.fontSize, _Comboboxtokens.tokens.textFieldFontSize, _EmptyState.emptyStateTokens.fontStyle, _Comboboxtokens.tokens.textFieldFontStyle, _EmptyState.emptyStateTokens.fontWeight, _Comboboxtokens.tokens.textFieldFontWeight, _EmptyState.emptyStateTokens.fontLetterSpacing, _Comboboxtokens.tokens.textFieldLetterSpacing, _EmptyState.emptyStateTokens.fontLineHeight, _Comboboxtokens.tokens.textFieldLineHeight);
const StyledLeftHelper = _styledcomponents.default.span.withConfig({
    displayName: "Combobox.styles__StyledLeftHelper",
    componentId: "sc-638e27f3-5"
})([
    `margin:0;padding:0;`
]);
