import { s as styleInject, u as useViewHandler, b as PriceCounter } from './index-bbdfb97a.js';
import classnames from 'classnames';
import { observer } from 'mobx-react-lite';
import 'react';
import { useDivaCore, useTranslation } from '@crystaldesign/diva-core';
import { jsxs, jsx, Fragment } 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 sumWrapper = "sum-wrapper-gnJDJ";
var isMobile = "is-mobile-MyAw2";
var priceWrapper = "price-wrapper-OEjmk";
var price = "price-JPhUm";
var betterPrice = "better-price-q5J8D";
var canceled = "canceled-sYf8-";
var hidden = "hidden-et6vJ";
var css_248z = ".sum-wrapper-gnJDJ {\n  height: 40px;\n  line-height: 30px;\n  display: flex;\n  justify-content: space-between;\n  font-weight: 700;\n  font-size: 16px;\n  flex-grow: 1;\n}\n\n.is-mobile-MyAw2.sum-wrapper-gnJDJ {\n  line-height: 38px;\n  font-size: 18px;\n  justify-content: flex-end;\n  flex-wrap: nowrap;\n  gap: 12px;\n}\n\n.price-wrapper-OEjmk {\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: nowrap;\n}\n\n.price-JPhUm {\n  position: relative;\n  color: #262626;\n  text-wrap: nowrap;\n}\n\n.is-mobile-MyAw2 .price-JPhUm {\n  font-size: 15px;\n}\n\n.better-price-q5J8D {\n  color: #b1223f;\n  margin-right: 12px;\n}\n\n.price-JPhUm.canceled-sYf8- {\n  color: #bfbfbf;\n  opacity: 1;\n  transition:\n    opacity 0.3s ease-in-out,\n    max-width 0.3s ease-in-out;\n  max-width: 110px;\n}\n.price-JPhUm.canceled-sYf8-.hidden-et6vJ {\n  opacity: 0;\n  max-width: 0px;\n}\n\n.price-JPhUm.canceled-sYf8-:before {\n  position: absolute;\n  content: '';\n  left: 0;\n  top: 42%;\n  right: 0;\n  border-top: 2px solid;\n  border-color: #b1223f;\n  transform: rotate(-7deg);\n}\n\n.is-mobile-MyAw2 .price-JPhUm.canceled-sYf8-:before {\n  top: 45%;\n}\n";
styleInject(css_248z);

var PriceSumm = function PriceSumm(props) {
  var _viewHandler$productS, _viewHandler$productS2;
  var viewHandler = useViewHandler();
  var _useDivaCore = useDivaCore(),
    hidePrices = _useDivaCore.state.hidePrices;
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  return /*#__PURE__*/jsxs("div", {
    className: classnames(sumWrapper, viewHandler.getIsInMobileView() ? isMobile : undefined),
    children: [/*#__PURE__*/jsx("div", {
      children: t('configurator.Sum', 'Summe')
    }), /*#__PURE__*/jsx("div", {
      className: priceWrapper,
      children: !hidePrices && /*#__PURE__*/jsxs(Fragment, {
        children: [/*#__PURE__*/jsx("div", {
          className: classnames(price, viewHandler.productState.formatedBruttoPrice ? betterPrice : undefined),
          children: /*#__PURE__*/jsx(PriceCounter, {
            price: (_viewHandler$productS = viewHandler.productState.formatedCurSetPrice) !== null && _viewHandler$productS !== void 0 ? _viewHandler$productS : 0
          })
        }), /*#__PURE__*/jsxs("div", {
          className: classnames(price, canceled, !viewHandler.productState.formatedBruttoPrice ? hidden : undefined),
          children: [' ', /*#__PURE__*/jsx(PriceCounter, {
            price: (_viewHandler$productS2 = viewHandler.productState.formatedBruttoPrice) !== null && _viewHandler$productS2 !== void 0 ? _viewHandler$productS2 : 0
          })]
        })]
      })
    })]
  });
};
var PriceSumm$1 = observer(PriceSumm);

export { PriceSumm$1 as default };
