import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { s as styleInject, u as useViewHandler } from './index-bbdfb97a.js';
import 'react';
import { observer } from 'mobx-react-lite';
import classnames from 'classnames';
import ArQrCodeIcon from './index-7167c5bc.js';
import { u as useCustomDimensions } from './useCustomDimensions-8be02680.js';
import { useTranslation } from '@crystaldesign/diva-core';
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
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';
import 'react-laag';
import './index-5a146745.js';
import 'react-qr-code';
import './index-c648d661.js';

var wrapper = "wrapper-IoYoU";
var subWrapper = "subWrapper-Gf23J";
var row = "row-fJACz";
var header = "header-wqJL7";
var column = "column-HLDRl";
var black = "black-AHhTL";
var separator = "separator-MwswF";
var button = "button-74YF9";
var css_248z = ".wrapper-IoYoU {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  position: relative;\n  border: 1px solid var(--diva-theme-palette-primary-main);\n  border-radius: calc(var(--buttons-border-radius) * 2);\n  color: var(--diva-theme-palette-primary-main);\n  width: calc(100% - 32px);\n  padding: 16px;\n  margin: 12px 0px;\n}\n\n.subWrapper-Gf23J {\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  gap: 8px;\n  font-size: 14px;\n}\n\n.wrapper-IoYoU::before {\n  content: '';\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  background-color: var(--diva-theme-palette-primary-light);\n  opacity: 0.15;\n  z-index: -1;\n  pointer-events: none;\n  border-radius: inherit;\n}\n\n.row-fJACz {\n  display: flex;\n  flex-direction: row;\n  gap: 16px;\n  justify-content: space-between;\n  width: 100%;\n}\n\n.header-wqJL7 {\n  font-weight: 600;\n}\n\n.column-HLDRl {\n  display: flex;\n  gap: 4px;\n  align-items: center;\n}\n\n.black-AHhTL {\n  color: #000;\n  font-weight: 600;\n}\n\n.separator-MwswF {\n  width: 100%;\n  height: 1px;\n  background-color: var(--diva-theme-palette-primary-main);\n}\n\n.button-74YF9 {\n  cursor: pointer;\n  width: calc(100% - 32px);\n  height: 22px;\n  padding: 8px 16px;\n  background-color: transparent;\n  border: 1px solid var(--diva-theme-palette-primary-main);\n  border-radius: calc(var(--buttons-border-radius) * 1.5);\n  font-size: 14px;\n  font-weight: 600;\n  display: flex;\n  flex-direction: row;\n  gap: 8px;\n  align-items: center;\n  justify-content: center;\n  transition:\n    background-color 0.3s ease,\n    box-shadow 0.3s ease;\n}\n\n.button-74YF9:hover {\n  background-color: var(--diva-theme-palette-primary-light);\n  box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.1);\n}\n";
styleInject(css_248z);

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var ArticleOverview = function ArticleOverview() {
  var _bbox$X, _bbox$Y, _bbox$Z, _bbox$wOLT, _bbox$dOLT, _bbox$hOLT;
  var viewHandler = useViewHandler();
  var _useCustomDimensions = useCustomDimensions(),
    dimensions = _useCustomDimensions.dimensions,
    dimOnlyForOneArticle = _useCustomDimensions.dimOnlyForOneArticle;
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var bbox = viewHandler.settingsState.bbox;
  return /*#__PURE__*/jsxs("div", {
    className: wrapper,
    children: [/*#__PURE__*/jsx("div", {
      className: row,
      children: /*#__PURE__*/jsxs("div", {
        className: classnames(column, header),
        children: [/*#__PURE__*/jsxs("svg", {
          xmlns: "http://www.w3.org/2000/svg",
          width: "18",
          height: "18",
          viewBox: "0 0 24 24",
          fill: "none",
          stroke: "var(--diva-theme-palette-primary-main)",
          strokeWidth: "2",
          strokeLinecap: "round",
          strokeLinejoin: "round",
          children: [/*#__PURE__*/jsx("path", {
            d: "M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"
          }), /*#__PURE__*/jsx("path", {
            d: "m14.5 12.5 2-2"
          }), /*#__PURE__*/jsx("path", {
            d: "m11.5 9.5 2-2"
          }), /*#__PURE__*/jsx("path", {
            d: "m8.5 6.5 2-2"
          }), /*#__PURE__*/jsx("path", {
            d: "m17.5 15.5 2-2"
          })]
        }), t('configurator.summary.total_dimensions')]
      })
    }), /*#__PURE__*/jsxs("div", {
      className: subWrapper,
      children: [/*#__PURE__*/jsxs("div", {
        className: row,
        children: [/*#__PURE__*/jsx("div", {
          className: column,
          children: t('configurator.bth')
        }), /*#__PURE__*/jsxs("div", {
          className: classnames(column, black),
          children: [(_bbox$X = bbox === null || bbox === void 0 ? void 0 : bbox.X) !== null && _bbox$X !== void 0 ? _bbox$X : -1, " \xD7 ", (_bbox$Y = bbox === null || bbox === void 0 ? void 0 : bbox.Y) !== null && _bbox$Y !== void 0 ? _bbox$Y : -1, " \xD7 ", (_bbox$Z = bbox === null || bbox === void 0 ? void 0 : bbox.Z) !== null && _bbox$Z !== void 0 ? _bbox$Z : -1, " cm"]
        })]
      }), (bbox === null || bbox === void 0 ? void 0 : bbox.wOLT) !== undefined && /*#__PURE__*/jsxs("div", {
        className: row,
        children: [/*#__PURE__*/jsx("div", {
          className: column,
          children: t('configurator.without_olf')
        }), /*#__PURE__*/jsxs("div", {
          className: classnames(column, black),
          children: [(_bbox$wOLT = bbox === null || bbox === void 0 ? void 0 : bbox.wOLT) !== null && _bbox$wOLT !== void 0 ? _bbox$wOLT : -1, " \xD7 ", (_bbox$dOLT = bbox === null || bbox === void 0 ? void 0 : bbox.dOLT) !== null && _bbox$dOLT !== void 0 ? _bbox$dOLT : -1, " \xD7 ", (_bbox$hOLT = bbox === null || bbox === void 0 ? void 0 : bbox.hOLT) !== null && _bbox$hOLT !== void 0 ? _bbox$hOLT : -1, " cm"]
        })]
      }), !!(dimensions !== null && dimensions !== void 0 && dimensions.length) && (dimensions === null || dimensions === void 0 ? void 0 : dimensions.map(function (dimension) {
        var _dimension$text, _dimension$dimension;
        return /*#__PURE__*/jsxs("div", {
          className: row,
          children: [/*#__PURE__*/jsxs("div", {
            className: column,
            children: [(_dimension$text = dimension.text) !== null && _dimension$text !== void 0 ? _dimension$text : t('configurator.headerdimension.' + dimension.dimensionId), !dimOnlyForOneArticle && ' (' + dimension.posNrs.join(',') + ')']
          }), /*#__PURE__*/jsxs("div", {
            className: classnames(column, black),
            children: [(_dimension$dimension = dimension.dimension) !== null && _dimension$dimension !== void 0 ? _dimension$dimension : 0, " ", dimension.unit]
          })]
        });
      }))]
    }), viewHandler.productState.allowQRCodeAR && /*#__PURE__*/jsxs(Fragment, {
      children: [/*#__PURE__*/jsx("div", {
        className: separator
      }), /*#__PURE__*/jsx(ArQrCodeIcon, {
        dontOpenModal: true,
        Button: function Button(props) {
          return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
            className: button
          }, props), {}, {
            children: [/*#__PURE__*/jsxs("svg", {
              width: "32",
              height: "32",
              viewBox: "0 0 32 32",
              fill: "none",
              xmlns: "http://www.w3.org/2000/svg",
              children: [/*#__PURE__*/jsx("circle", {
                cx: "16",
                cy: "16",
                r: "16"
              }), /*#__PURE__*/jsx("path", {
                fillRule: "evenodd",
                clipRule: "evenodd",
                d: "M18.9044 9.14469L16.5714 8.04166C16.4524 7.98611 16.3175 7.98611 16.1984 8.04166L13.8575 9.14469C13.5242 9.3034 13.3734 9.70811 13.5321 10.0414C13.6432 10.2874 13.8892 10.4302 14.1432 10.4302C14.2384 10.4302 14.3336 10.4064 14.4288 10.3668L15.7064 9.76366V11.4063C15.7064 11.7793 16.008 12.0808 16.381 12.0808C16.7539 12.0808 17.0555 11.7793 17.0555 11.4063V9.76366L18.3331 10.3668C18.6664 10.5255 19.0711 10.3826 19.2298 10.0414C19.3885 9.70018 19.2457 9.3034 18.9044 9.14469ZM18.3324 13.6921L16.3803 14.6126L14.4282 13.6921C14.0949 13.5334 13.6902 13.6762 13.5315 14.0175C13.3728 14.3508 13.5156 14.7555 13.8568 14.9142L15.682 15.7712C15.682 15.7871 15.678 15.801 15.674 15.8149C15.6701 15.8287 15.6661 15.8426 15.6661 15.8585V17.5091C15.6661 17.882 15.9677 18.1836 16.3406 18.1836C16.7136 18.1836 17.0151 17.882 17.0151 17.5091V15.8585C17.0151 15.8506 17.0132 15.8426 17.0112 15.8347L17.0112 15.8347C17.0092 15.8267 17.0072 15.8188 17.0072 15.8109L18.9117 14.9142C19.245 14.7555 19.3958 14.3508 19.2371 14.0175C19.0704 13.6842 18.6657 13.5334 18.3324 13.6921ZM21.4188 10.3832L23.5059 11.3831C23.6646 11.4545 23.7598 11.6132 23.7598 11.7798V14.1843C23.7598 14.5573 23.4583 14.8588 23.0853 14.8588C22.7123 14.8588 22.4108 14.5573 22.4108 14.1843V13.2955L21.3077 13.8113C21.2125 13.851 21.1173 13.8748 21.0221 13.8748C20.7681 13.8748 20.5221 13.732 20.411 13.486C20.2523 13.1527 20.4031 12.748 20.7364 12.5893L21.8315 12.0735L20.8395 11.5973C20.5063 11.4386 20.3634 11.0339 20.5221 10.7006C20.6808 10.3673 21.0855 10.2245 21.4188 10.3832ZM12.0234 12.589L10.9283 12.0732L11.9203 11.597C12.2536 11.4383 12.3964 11.0336 12.2377 10.7003C12.079 10.3591 11.6743 10.2162 11.341 10.3829L9.25394 11.3828C9.09523 11.4542 9 11.6129 9 11.7795V14.1761C9 14.549 9.30155 14.8506 9.67452 14.8506C10.0475 14.8506 10.349 14.557 10.349 14.184V13.2873L11.4521 13.8031C11.5473 13.8507 11.6425 13.8745 11.7377 13.8745C11.9917 13.8745 12.2377 13.7317 12.3488 13.4857C12.5075 13.1524 12.3646 12.7477 12.0234 12.589ZM11.4521 18.4139C11.7854 18.2552 12.1901 18.4059 12.3488 18.7392C12.5075 19.0805 12.3646 19.4852 12.0234 19.6439L10.9283 20.1597L11.9203 20.6358C12.2536 20.7945 12.3964 21.1992 12.2377 21.5325C12.1186 21.7706 11.8806 21.9134 11.6266 21.9134C11.5235 21.9134 11.4283 21.8976 11.333 21.8499L9.246 20.8501C9.09523 20.7786 9 20.6199 9 20.4533V18.0488C9 17.6759 9.30155 17.3743 9.67452 17.3743C10.0475 17.3743 10.349 17.6759 10.349 18.0488V18.9376L11.4521 18.4139Z",
                fill: "var(--diva-theme-palette-primary-main)"
              }), /*#__PURE__*/jsx("path", {
                d: "M18.749 24H17.6823L17.272 22.799H15.3849L14.9746 24H13.9229L15.7205 19.0769H16.9513L18.749 24ZM15.6161 22.0382H17.0408L16.3247 19.89L15.6161 22.0382Z",
                fill: "var(--diva-theme-palette-primary-main)"
              }), /*#__PURE__*/jsx("path", {
                d: "M21.6498 19.0769C22.2068 19.0769 22.6444 19.2112 22.9627 19.4797C23.2809 19.7482 23.44 20.1088 23.44 20.5613C23.44 21.0436 23.2809 21.4141 22.9627 21.6727C22.6444 21.9263 22.2093 22.0531 21.6573 22.0531L21.5529 22.1128H20.4937V24H19.4792V19.0769H21.6498ZM21.5305 21.3296C21.8189 21.3296 22.0327 21.2724 22.172 21.158C22.3162 21.0387 22.3883 20.8572 22.3883 20.6135C22.3883 20.3698 22.3162 20.1908 22.172 20.0764C22.0327 19.9571 21.8189 19.8974 21.5305 19.8974H20.4937V21.3296H21.5305ZM22.1347 21.5459L23.731 24H22.5748L21.2545 21.8443L22.1347 21.5459Z",
                fill: "var(--diva-theme-palette-primary-main)"
              })]
            }), t('configurator.ar_try_at_home')]
          }));
        }
      })]
    })]
  });
};
var ArticleOverview$1 = observer(ArticleOverview);

export { ArticleOverview$1 as default };
