import { s as styleInject, u as useViewHandler } from './index-bbdfb97a.js';
import 'react';
import { ContentBoxComponent } from '@crystaldesign/content-box';
import { observer } from 'mobx-react-lite';
import FilterItem from './index-e9a81262.js';
import { jsx, jsxs } 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 'classnames';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';

var colorFilterIcon = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCEAAUFBQgFCAwHBwwMCQkJDA0MDAwMDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0BBQgICgcKDAcHDA0MCgwNDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDf/EAaIAAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKCwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj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S/mj7r+Wz+a/G58bi5ypSt0eqPRtPGCDXTUlpY+Yq4hrqemaVfNGoGa+IzKPPFonD4hqVzsLXUmXvX5LiIOEmfZ0a10cb8U/HCeHPD9xtbFzeI1tAoPO6RdruPaNCXzjG7avG4Vtl2HeKxMFb3INTm+lk7pf9vPT0u+h6MZ30R8LaTq02jzCeHnsynO1h6HHcdj2PqMg/rVGtKhLnh810aMq1GNePJP5Pqn3PdfD3i/T9QCgyLDL3jkIU59icK3/ATn1Ar2/rUKi0dn2f9anwmLwNek7qLnH+aKv96Wq/LzPVLO9RV37ht9cjH59K8HFvmTPLpJxlazv2tqY+tfE7SdAQgyi5mA4hgIc5/wBpgdiD13NuxyFaviqmAqYmXurlX8z0+5bv+tT6/DUq07e64rvLT7lu/wAvM+YPFXiu98XXn2y9IAUbYolzsiTOdq56knlmPLH0AVR9FhcLTwcPZ0lvrJveT7v9F09bt/SwioKyP//Z";

var container = "container-UEbzL";
var colorFilter = "colorFilter-CK-4p";
var deselectColor = "deselectColor-vefuo";
var css_248z = ".container-UEbzL {\n  position: relative;\n}\n\n.colorFilter-CK-4p {\n  border-radius: 50%;\n  border: solid 2px var(--secondaryColor);\n  width: 26px;\n  height: 26px;\n  cursor: pointer;\n}\n\n.deselectColor-vefuo {\n  position: absolute;\n  top: 0;\n  left: 0;\n  cursor: pointer;\n  background-image: url(\"data:image/svg+xml,%3Csvg width%3D%226%22 height%3D%226%22 viewBox%3D%220 0 6 6%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M5 1L3 3M3 3L5 5M3 3L1 5M3 3L1 1%22 stroke%3D%22white%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n  background-color: var(--secondaryColor);\n  border-radius: 50%;\n  background-repeat: no-repeat;\n  background-position: center center;\n  background-size: 70%;\n  width: 12px;\n  height: 12px;\n}\n";
styleInject(css_248z);

var SlideFilter = function SlideFilter(_ref) {
  var _viewHandler$settings;
  var visibleColorItems = _ref.visibleColorItems,
    id = _ref.id,
    deleteCurValue = _ref.deleteCurValue;
  var viewHandler = useViewHandler();
  var contents = visibleColorItems.map(function (item) {
    return {
      swiperSlideStyle: {
        backgroundColor: 'transparent',
        width: 60
      },
      content: /*#__PURE__*/jsx(FilterItem, {
        id: id,
        item: item
      })
    };
  });
  var jsXFilter = /*#__PURE__*/jsx(ContentBoxComponent, {
    settings: {
      contentBoxProps: {
        type: 'SliderContainer',
        sliderType: 'slideX',
        resistanceRatio: 0,
        height: 'auto',
        slidesPerView: 7,
        contents: contents,
        centeredSlides: true

        // autoPlay: 3,
      }
    }
  });
  var onClick = function onClick() {
    var boxContent = viewHandler.settingsState.infoBoxContent;
    if (boxContent && boxContent.id === id && boxContent.type === 'filter') viewHandler.settingsState.updateInfoBox();else viewHandler.settingsState.updateInfoBox({
      type: 'filter',
      id: id,
      content: jsXFilter
    });
  };
  return /*#__PURE__*/jsxs("div", {
    className: container,
    "data-test-id": "slide-filter",
    children: [((_viewHandler$settings = viewHandler.settingsState.itemPalettes.get(id)) === null || _viewHandler$settings === void 0 ? void 0 : _viewHandler$settings.filterValue) && /*#__PURE__*/jsx("div", {
      className: deselectColor,
      onClick: deleteCurValue
    }), /*#__PURE__*/jsx("img", {
      className: colorFilter,
      src: colorFilterIcon,
      onClick: onClick
    })]
  });
};
var SlideFilter$1 = observer(SlideFilter);

export { SlideFilter$1 as default };
