import { s as styleInject, u as useViewHandler } from './index-bbdfb97a.js';
import classnames from 'classnames';
import { observer } from 'mobx-react-lite';
import 'react';
import { useTranslation } from '@crystaldesign/diva-core';
import { jsx, jsxs } from 'react/jsx-runtime';
import '@babel/runtime/helpers/defineProperty';
import 'react-dynamic-multi-render';
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 paletteItem = "palette-item-nXICy";
var imageWrapper = "imageWrapper--38qX";
var sel = "sel-wpwWJ";
var imageBackground = "imageBackground-qOQQh";
var wcImage = "wcImage-e8f7s";
var title = "title-63pJt";
var textHover = "textHover-nhN12";
var css_248z = "/*Size Normal */\n\n.palette-item-nXICy {\n  border-radius: var(--globalBorderRadius);\n  margin: 0.2125rem;\n  position: relative;\n  float: left;\n  width: 96px;\n  height: 96px;\n  z-index: 100;\n  transition: all 0.15s ease;\n  cursor: pointer;\n}\n\n.palette-item-nXICy:active {\n  z-index: 200;\n  transition: 0.15s ease;\n}\n.palette-item-nXICy:hover {\n  z-index: 200;\n  transition: 0.15s ease;\n}\n\n.imageWrapper--38qX {\n  border-radius: 50%;\n  border: 1px transparent solid;\n  width: 94px;\n  height: 94px;\n  transition: 0.15s ease;\n  border-style: double;\n}\n.imageWrapper--38qX:hover {\n  box-shadow: 0px 1px 4px rgba(68, 49, 49, 0.15);\n  border: 1px var(--primaryColor) solid;\n}\n.sel-wpwWJ .imageWrapper--38qX:hover,\n.small-bg43M.sel-wpwWJ .imageWrapper--38qX:hover {\n  box-shadow: 0px 1px 4px rgba(68, 49, 49, 0.15);\n  border: 1px var(--primaryColor) solid;\n}\n.sel-wpwWJ .imageWrapper--38qX,\n.small-bg43M.sel-wpwWJ .imageWrapper--38qX {\n  box-shadow: 0px 1px 4px rgba(68, 49, 49, 0.15);\n}\n\n.imageBackground-qOQQh {\n  border-radius: 50%;\n  border: 4px white solid;\n  width: 86px;\n  height: 86px;\n  transition: 0.15s ease;\n  background-color: #c2c2c2;\n}\n\n.sel-wpwWJ .imageBackground-qOQQh,\n.imageWrapper--38qX:hover {\n  background-color: #404040;\n}\n\n.sel-wpwWJ .imageBackground-qOQQh {\n  border: 4px var(--primaryColor) solid;\n}\n\n.wcImage-e8f7s {\n  width: 100%;\n  height: 86px;\n  border-radius: 50%;\n  background-size: cover;\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.sel-wpwWJ .wcImage-e8f7s,\n.small-bg43M.sel-wpwWJ .wcImage-e8f7s,\n.imageWrapper--38qX:hover .wcImage-e8f7s {\n  opacity: 0.5;\n}\n\n.title-63pJt {\n  text-align: center;\n  width: 100%;\n  font-size: 14px;\n  line-height: 96px;\n  display: none;\n  position: absolute;\n  top: 0;\n  z-index: 400;\n  color: #fff;\n  font-weight: 600;\n}\n\n.imageWrapper--38qX:hover .title-63pJt,\n.textHover-nhN12,\n.sel-wpwWJ .title-63pJt {\n  display: block;\n}\n\n@media all and (max-width: 1800px) {\n  .palette-item-nXICy {\n    width: 81px;\n    height: 81px;\n  }\n  .imageWrapper--38qX {\n    width: 79px;\n    height: 79px;\n  }\n  .imageBackground-qOQQh {\n    width: 71px;\n    height: 71px;\n  }\n  .wcImage-e8f7s {\n    height: 71px;\n  }\n  .title-63pJt {\n    line-height: 81px;\n    font-size: 12px;\n  }\n}\n";
styleInject(css_248z);

var Room = function Room(_ref) {
  var itemP = _ref.item,
    from = _ref.from;
  var item = itemP;
  var viewHandler = useViewHandler();
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  return /*#__PURE__*/jsx("div", {
    className: paletteItem,
    onClick: function onClick() {
      return viewHandler.paletteViewHandler.clickedOnStaticRoomPalette(item, !!from);
    },
    children: /*#__PURE__*/jsx("div", {
      className: classnames(item.sel ? sel : undefined),
      children: /*#__PURE__*/jsxs("div", {
        className: classnames(imageWrapper),
        children: [/*#__PURE__*/jsx("div", {
          className: classnames(imageBackground),
          children: /*#__PURE__*/jsx("div", {
            className: wcImage,
            style: {
              backgroundImage: "url(".concat(item.url, ")")
            }
          })
        }), /*#__PURE__*/jsx("div", {
          className: classnames(title, !item.url ? textHover : undefined),
          children: t('configurator.' + item.N)
        })]
      })
    })
  });
};
var RoomSerious = observer(Room);

export { RoomSerious as default };
