import './Combobox.styles_1tnycdz.css';
import { styled } from '@linaria/react';
import { IconDisclosureDownCentered } from '../_Icon/Icons/IconDisclosureDownCentered.js';
import { tokens } from './Combobox.tokens.js';
import { component, mergeConfig } from '../../engines/common.js';
import { emptyStateConfig } from '../EmptyState/EmptyState.js';

var mergedConfig = /*#__PURE__*/mergeConfig(emptyStateConfig);
var EmptyState = /*#__PURE__*/component(mergedConfig);
var _exp = function _exp() {
  return function (_ref) {
    var listWidth = _ref.listWidth;
    return listWidth || '100%';
  };
};
var ListWrapper = /*#__PURE__*/styled('div')({
  name: "ListWrapper",
  "class": "l2r9bk2",
  propsAsIs: false,
  vars: {
    "l2r9bk2-0": [/*#__PURE__*/_exp()]
  }
});
var _exp9 = function _exp9() {
  return function (_ref2) {
    var virtual = _ref2.virtual,
      listMaxHeight = _ref2.listMaxHeight;
    return virtual ? 'auto' : listMaxHeight || 'auto';
  };
};
var _exp0 = function _exp0() {
  return function (_ref3) {
    var virtual = _ref3.virtual;
    return virtual ? 'visible' : 'auto';
  };
};
var Ul = /*#__PURE__*/styled('ul')({
  name: "Ul",
  "class": "uju9j58",
  propsAsIs: false,
  vars: {
    "uju9j58-0": [/*#__PURE__*/_exp9()],
    "uju9j58-1": [/*#__PURE__*/_exp0()]
  }
});
var _exp13 = function _exp13() {
  return function (_ref4) {
    var disabled = _ref4.disabled,
      readOnly = _ref4.readOnly;
    return disabled || readOnly ? 'inherit' : 'pointer';
  };
};
var _exp15 = function _exp15() {
  return function (_ref5) {
    var disabled = _ref5.disabled,
      readOnly = _ref5.readOnly;
    return disabled || readOnly ? "var(".concat(tokens.disclosureIconColor, ")") : "var(".concat(tokens.disclosureIconColorHover, ")");
  };
};
var IconArrowWrapper = /*#__PURE__*/styled('div')({
  name: "IconArrowWrapper",
  "class": "i3q81ym",
  propsAsIs: false,
  vars: {
    "i3q81ym-0": [/*#__PURE__*/_exp13()],
    "i3q81ym-1": [/*#__PURE__*/_exp15()]
  }
});

// TODO: Удалить после поддержки JS переменных в конфиге компонент
var sizeMap = {
  xs: '1rem',
  s: '1.5rem'
};
var _exp16 = function _exp16() {
  return IconDisclosureDownCentered;
};
var _exp18 = function _exp18() {
  return function (_ref6) {
    var _ref6$size = _ref6.size,
      size = _ref6$size === void 0 ? 'xs' : _ref6$size;
    return "var(".concat(tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
  };
};
var StyledArrow = /*#__PURE__*/styled(_exp16())({
  name: "StyledArrow",
  "class": "stl1mou",
  propsAsIs: true,
  vars: {
    "stl1mou-0": [/*#__PURE__*/_exp18()]
  }
});
var base = "b1xd63c2";
var _exp19 = function _exp19() {
  return EmptyState;
};
var StyledEmptyState = /*#__PURE__*/styled(_exp19())({
  name: "StyledEmptyState",
  "class": "s1398zez",
  propsAsIs: true
});
var StyledLeftHelper = /*#__PURE__*/styled('span')({
  name: "StyledLeftHelper",
  "class": "sz5ez20",
  propsAsIs: false
});

export { IconArrowWrapper, ListWrapper, StyledArrow, StyledEmptyState, StyledLeftHelper, Ul, base, sizeMap };
