import './Item.styles_15u989q.css';
import { styled } from '@linaria/react';
import { tokens } from '../../../../Select.tokens.js';
import { IconDone } from '../../../../../_Icon/Icons/IconDone.js';
import { IconDisclosureRightCentered } from '../../../../../_Icon/Icons/IconDisclosureRightCentered.js';
import { component, mergeConfig } from '../../../../../../engines/common.js';
import { checkboxConfig } from '../../../../../Checkbox/Checkbox.js';
import { cellConfig } from '../../../../../Cell/Cell.js';
import { indicatorConfig } from '../../../../../Indicator/Indicator.js';

var ItemWrapper = /*#__PURE__*/styled('div')({
  name: "ItemWrapper",
  "class": "i1mcx8at",
  propsAsIs: false
});
var mergedCheckboxConfig = /*#__PURE__*/mergeConfig(checkboxConfig);
var Checkbox = /*#__PURE__*/component(mergedCheckboxConfig);
var mergedCellConfig = /*#__PURE__*/mergeConfig(cellConfig);
var Cell = /*#__PURE__*/component(mergedCellConfig);
var mergedIndicatorConfig = /*#__PURE__*/mergeConfig(indicatorConfig);
var Indicator = /*#__PURE__*/component(mergedIndicatorConfig);

// TODO: #1548
var _exp = function _exp() {
  return Cell;
};
var StyledCell = /*#__PURE__*/styled(_exp())({
  name: "StyledCell",
  "class": "sonwjez",
  propsAsIs: true
});
var _exp29 = function _exp29() {
  return Checkbox;
};
var StyledCheckbox = /*#__PURE__*/styled(_exp29())({
  name: "StyledCheckbox",
  "class": "spxkvg",
  propsAsIs: true
});
var _exp44 = function _exp44() {
  return Indicator;
};
var StyledIndicator = /*#__PURE__*/styled(_exp44())({
  name: "StyledIndicator",
  "class": "s1kltu2x",
  propsAsIs: true
});

// TODO: Удалить после поддержки JS переменных в конфиге компонент
var sizeMap = {
  xs: '1rem',
  s: '1.5rem'
};
var _exp49 = function _exp49() {
  return IconDisclosureRightCentered;
};
var _exp51 = function _exp51() {
  return function (_ref) {
    var _ref$size = _ref.size,
      size = _ref$size === void 0 ? 'xs' : _ref$size;
    return "var(".concat(tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
  };
};
var StyledArrowLeft = /*#__PURE__*/styled(_exp49())({
  name: "StyledArrowLeft",
  "class": "s2jhms8",
  propsAsIs: true,
  vars: {
    "s2jhms8-0": [/*#__PURE__*/_exp51()]
  }
});
var _exp53 = function _exp53() {
  return IconDisclosureRightCentered;
};
var _exp55 = function _exp55() {
  return function (_ref2) {
    var _ref2$size = _ref2.size,
      size = _ref2$size === void 0 ? 'xs' : _ref2$size;
    return "var(".concat(tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
  };
};
var StyledArrowRight = /*#__PURE__*/styled(_exp53())({
  name: "StyledArrowRight",
  "class": "sxkrxe6",
  propsAsIs: true,
  vars: {
    "sxkrxe6-0": [/*#__PURE__*/_exp55()]
  }
});
var _exp57 = function _exp57() {
  return IconDone;
};
var _exp59 = function _exp59() {
  return function (_ref3) {
    var _ref3$size = _ref3.size,
      size = _ref3$size === void 0 ? 'xs' : _ref3$size;
    return "var(".concat(tokens.disclosureIconSize, ", ").concat(sizeMap[size], ")");
  };
};
var StyledIconDone = /*#__PURE__*/styled(_exp57())({
  name: "StyledIconDone",
  "class": "ssx7sdz",
  propsAsIs: true,
  vars: {
    "ssx7sdz-0": [/*#__PURE__*/_exp59()]
  }
});
var _exp62 = function _exp62() {
  return function (_ref4) {
    var visibility = _ref4.visibility;
    return visibility || 'visible';
  };
};
var DisclosureIconWrapper = /*#__PURE__*/styled('div')({
  name: "DisclosureIconWrapper",
  "class": "d1vd06r4",
  propsAsIs: false,
  vars: {
    "d1vd06r4-0": [/*#__PURE__*/_exp62()]
  }
});
var _exp66 = function _exp66() {
  return function (_ref5) {
    var variant = _ref5.variant;
    return "var(".concat(variant === 'tight' ? tokens.itemIconSizeTight : tokens.itemIconSize, ")");
  };
};
var IconWrapper = /*#__PURE__*/styled('div')({
  name: "IconWrapper",
  "class": "i1g1nxil",
  propsAsIs: false,
  vars: {
    "i1g1nxil-0": [/*#__PURE__*/_exp66()]
  }
});
var StyledText = /*#__PURE__*/styled('div')({
  name: "StyledText",
  "class": "somnyde",
  propsAsIs: false
});
var _exp71 = function _exp71() {
  return function (_ref6) {
    var variant = _ref6.variant;
    return "var(".concat(variant === 'tight' ? tokens.itemPaddingTight : tokens.itemPadding, ")");
  };
};
var Wrapper = /*#__PURE__*/styled('div')({
  name: "Wrapper",
  "class": "w1mt67u4",
  propsAsIs: false,
  vars: {
    "w1mt67u4-0": [/*#__PURE__*/_exp71()]
  }
});
var StyledCheckboxWrapper = /*#__PURE__*/styled('span')({
  name: "StyledCheckboxWrapper",
  "class": "sso4887",
  propsAsIs: false
});
var ChildItems = /*#__PURE__*/styled('div')({
  name: "ChildItems",
  "class": "cx1lxn",
  propsAsIs: false
});
var _exp88 = function _exp88() {
  return function (_ref7) {
    var depth = _ref7.depth;
    return depth || 0;
  };
};
var Offset = /*#__PURE__*/styled('div')({
  name: "Offset",
  "class": "o1uoviju",
  propsAsIs: false,
  vars: {
    "o1uoviju-0": [/*#__PURE__*/_exp88()]
  }
});

export { ChildItems, DisclosureIconWrapper, IconWrapper, ItemWrapper, Offset, StyledArrowLeft, StyledArrowRight, StyledCell, StyledCheckbox, StyledCheckboxWrapper, StyledIconDone, StyledIndicator, StyledText, Wrapper, sizeMap };
