import { s as styleInject, u as useViewHandler } from './index-bbdfb97a.js';
import classnames from 'classnames';
import { observer } from 'mobx-react-lite';
import 'react';
import IsActive from './index-3f40a92d.js';
import InfoIcon from './index-04a7a9b4.js';
import { jsxs, jsx } from 'react/jsx-runtime';
import '@babel/runtime/helpers/defineProperty';
import 'react-dynamic-multi-render';
import '@crystaldesign/diva-core';
import '@babel/runtime/helpers/asyncToGenerator';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/regenerator';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/toConsumableArray';
import '@crystaldesign/diva-utils';
import 'mobx';
import '@crystaldesign/web-planner-logic';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';

var articleItem = "article-item-560hu";
var wcSize = "wcSize-NqLig";
var wcConfiguratorSettingsTitle = "wcConfigurator-settings-title-Tn0PY";
var wcImage = "wcImage-ui7-N";
var css_248z = "/*Planner*/\n\n.article-item-560hu {\n  border-radius: var(--globalBorderRadius);\n  background: white;\n  position: relative;\n  display: flex;\n  z-index: 100;\n  transition: 0.35s ease;\n  cursor: pointer;\n  float: left;\n}\n\n.article-item-560hu:hover {\n  box-shadow: 0px 1px 4px rgba(68, 49, 49, 0.15);\n}\n.article-item-560hu:active {\n  box-shadow: 0px 1px 4px rgba(68, 49, 49, 0.6);\n}\n\n.article-item-560hu:hover {\n  z-index: 200;\n}\n\n.article-item-560hu .wcSize-NqLig {\n  width: 100%;\n  background: white;\n  position: relative;\n  border-radius: var(--globalBorderRadius);\n  user-select: none;\n  -moz-user-select: none;\n  -webkit-user-drag: none;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n}\n\n.article-item-560hu .wcConfigurator-settings-title-Tn0PY {\n  float: left;\n  margin-top: 11.2px;\n  margin-left: 11.2px;\n  max-width: calc(100% - 72px);\n  max-height: 64px;\n  min-height: 16px;\n  color: var(--secondaryColor);\n  font-size: 16px;\n  line-height: 20.8px;\n  overflow: hidden;\n  word-wrap: break-word;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  position: relative;\n  -webkit-hyphens: auto;\n  hyphens: auto;\n  z-index: 100;\n  user-select: none;\n  -moz-user-select: none;\n  -webkit-user-drag: none;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n}\n\n.article-item-560hu .wcImage-ui7-N {\n  width: 60px;\n  height: 60px;\n  float: left;\n  border-radius: var(--globalBorderRadius) 0px 0px var(--globalBorderRadius);\n  user-select: none;\n  -moz-user-select: none;\n  -webkit-user-drag: none;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n  background-size: contain;\n  background-repeat: no-repeat;\n  background-position: 50% 50%;\n}\n\n.article-item-560hu .wcConfigurator-settings-title-Tn0PY:hover {\n  max-height: 608px;\n  -webkit-line-clamp: 30;\n  overflow: visible;\n  background: #fff;\n}\n";
styleInject(css_248z);

var PlannerSwitch = function PlannerSwitch(_ref) {
  var itemP = _ref.item;
  var item = itemP;
  var viewHandler = useViewHandler();
  return /*#__PURE__*/jsxs("div", {
    className: classnames(articleItem),
    onClick: function onClick() {
      return viewHandler.paletteViewHandler.clickOnPlannerElementSwitch(item);
    },
    children: [item.sel && /*#__PURE__*/jsx(IsActive, {}), item.contentItemId && /*#__PURE__*/jsx(InfoIcon, {
      item: item
    }, item.articleCodex), /*#__PURE__*/jsxs("div", {
      className: classnames(wcSize),
      children: [/*#__PURE__*/jsx("div", {
        className: classnames(wcImage),
        style: {
          backgroundImage: "url(".concat(item.image, ")")
        },
        title: item.title
      }), /*#__PURE__*/jsx("div", {
        className: classnames(wcConfiguratorSettingsTitle),
        children: item.title
      })]
    })]
  });
};
var PlannerSwitch$1 = observer(PlannerSwitch);

export { PlannerSwitch$1 as default };
