import { u as useViewHandler } from './index-bbdfb97a.js';
import { observer } from 'mobx-react-lite';
import { useRef, useEffect } from 'react';
import Collapsible from 'react-collapsible';
import ConfigStep from './index-6ab6603a.js';
import Header from './index-b89fc578.js';
import { 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 'classnames';
import 'qrcode.react';
import '@babel/runtime/helpers/typeof';
import 'flat';
import 'react-switch';
import 'react-countup';

var VerticalTabGroupItemClassification = function VerticalTabGroupItemClassification(_ref) {
  var tabGroup = _ref.tabGroup;
    _ref.height;
    _ref.minHeight;
  var viewHandler = useViewHandler();
  var tabGroupItemRef = useRef(null);
  useEffect(function () {
    viewHandler.tabGroupState.setTabGroupItems(tabGroup.key, tabGroupItemRef.current);
  }, [tabGroupItemRef]);
  var configSteps = Array.from(tabGroup.options.values()).map(function (o) {
    return {
      configStep: Array.from(o.configSteps.values())[0],
      option: o
    };
  }).flat();
  return /*#__PURE__*/jsx("div", {
    ref: tabGroupItemRef,
    children: /*#__PURE__*/jsx(Collapsible, {
      open: true,
      easing: "ease",
      trigger: /*#__PURE__*/jsx(Header, {
        tabGroup: tabGroup,
        open: false
      }),
      triggerWhenOpen: /*#__PURE__*/jsx(Header, {
        tabGroup: tabGroup,
        open: true
      }),
      children: configSteps.map(function (step) {
        return /*#__PURE__*/jsx(ConfigStep, {
          step: step
        }, step.configStep.key);
      })
    })
  });
};
var index = observer(VerticalTabGroupItemClassification);

export { index as default };
