import _extends from "@babel/runtime/helpers/extends";
import "core-js/modules/es.symbol.js";
import "core-js/modules/es.array.index-of.js";
var __rest = this && this.__rest || function (s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
};
import * as React from 'react';
import { Grid, GridColumn, Accordion } from '@megafon/ui-core';
import { cnCreate } from '@megafon/ui-helpers';
import "./AccordionBox.css";
import { getColumnConfig } from "../../helpers/getColumnConfig";
var testIdPrefix = 'AccordionBox';
var cn = cnCreate('mfui-9-accordion-box');
var AccordionBox = function AccordionBox(_a) {
  var _a$hCenterAlignWide = _a.hCenterAlignWide,
    hCenterAlignWide = _a$hCenterAlignWide === void 0 ? false : _a$hCenterAlignWide,
    _a$isFullWidth = _a.isFullWidth,
    isFullWidth = _a$isFullWidth === void 0 ? false : _a$isFullWidth,
    restProps = __rest(_a, ["hCenterAlignWide", "isFullWidth"]);
  return /*#__PURE__*/React.createElement("div", {
    className: cn()
  }, /*#__PURE__*/React.createElement(Grid, {
    hAlign: hCenterAlignWide ? 'center' : 'left',
    dataAttrs: {
      container: {
        'data-testid': "".concat(testIdPrefix, "-container")
      }
    }
  }, /*#__PURE__*/React.createElement(GridColumn, _extends({}, getColumnConfig(isFullWidth), {
    dataAttrs: {
      root: {
        'data-testid': "".concat(testIdPrefix, "-column")
      }
    }
  }), /*#__PURE__*/React.createElement(Accordion, restProps))));
};
export default AccordionBox;