"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;
    }
});
var _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
var _EmptyState = require("../../EmptyState");
var _Icon = require("../../_Icon");
var _engines = require("../../../engines");
var _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;
}
var mergedConfig = (0, _engines.mergeConfig)(_EmptyState.emptyStateConfig);
var EmptyState = (0, _engines.component)(mergedConfig);
var ListWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Combobox.styles__ListWrapper",
    componentId: "sc-48cd29fe-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);"
], function(param) {
    var listWidth = param.listWidth;
    return listWidth || '100%';
}, _Comboboxtokens.tokens.padding, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.tokens.borderRadius, _Comboboxtokens.constants.background, _Comboboxtokens.constants.boxShadow, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.tokens.dropdownBorderColor);
var Ul = _styledcomponents.default.ul.withConfig({
    displayName: "Combobox.styles__Ul",
    componentId: "sc-48cd29fe-1"
})([
    "max-height:",
    ";overflow-x:hidden;overflow-y:",
    ";border-radius:calc(var(",
    ") - 0.125rem - var(",
    ",0rem));margin:0;padding:0;.",
    "{box-shadow:none;}"
], function(param) {
    var virtual = param.virtual, listMaxHeight = param.listMaxHeight;
    return virtual ? 'auto' : listMaxHeight || 'auto';
}, function(param) {
    var virtual = param.virtual;
    return virtual ? 'visible' : 'auto';
}, _Comboboxtokens.tokens.borderRadius, _Comboboxtokens.tokens.dropdownBorderWidth, _Comboboxtokens.classes.emptyStateWrapper);
var IconArrowWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Combobox.styles__IconArrowWrapper",
    componentId: "sc-48cd29fe-2"
})([
    "line-height:0;color:var(",
    ");cursor:",
    ";.",
    "{transform:rotate(-180deg);}&:hover,&:active{color:",
    ";}"
], _Comboboxtokens.tokens.disclosureIconColor, function(param) {
    var disabled = param.disabled, readOnly = param.readOnly;
    return disabled || readOnly ? 'inherit' : 'pointer';
}, _Comboboxtokens.classes.arrowInverse, function(param) {
    var disabled = param.disabled, readOnly = param.readOnly;
    return disabled || readOnly ? "var(".concat(_Comboboxtokens.tokens.disclosureIconColor, ")") : "var(".concat(_Comboboxtokens.tokens.disclosureIconColorHover, ")");
});
var sizeMap = {
    xs: '1rem',
    s: '1.5rem'
};
var StyledArrow = (0, _styledcomponents.default)(_Icon.IconDisclosureDownCentered).withConfig({
    displayName: "Combobox.styles__StyledArrow",
    componentId: "sc-48cd29fe-3"
})([
    "width:",
    ";height:",
    ";"
], function(param) {
    var _param_size = param.size, size = _param_size === void 0 ? 'xs' : _param_size;
    return "var(".concat(_Comboboxtokens.tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
}, function(param) {
    var _param_size = param.size, size = _param_size === void 0 ? 'xs' : _param_size;
    return "var(".concat(_Comboboxtokens.tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
});
var base = (0, _styledcomponents.css)([
    ""
]);
var StyledEmptyState = (0, _styledcomponents.default)(EmptyState).withConfig({
    displayName: "Combobox.styles__StyledEmptyState",
    componentId: "sc-48cd29fe-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);
var StyledLeftHelper = _styledcomponents.default.span.withConfig({
    displayName: "Combobox.styles__StyledLeftHelper",
    componentId: "sc-48cd29fe-5"
})([
    "margin:0;padding:0;"
]);
