"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
var _classnames = _interopRequireDefault(require("classnames"));
var _constants = require("../../constants");
var _Section = _interopRequireDefault(require("../Section"));
var _jsxRuntime = require("react/jsx-runtime");
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

/**
 * `SwitchesPanel` component is used for grouping several [SwitchesPanelItems](#!/SwitchesPanelItem) into one set.
 * @since 0.3.0
 */
const SwitchesPanel = _ref => {
  let {
    baseClassName = `${_constants.CLS_PREFIX}switches-panel`,
    className,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Section.default, {
    className: (0, _classnames.default)(baseClassName, className),
    ...props,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: `${baseClassName}__items`,
      children: children && _react.Children.map(children, child => /*#__PURE__*/(0, _react.cloneElement)(child, {
        className: (0, _classnames.default)(child.props.className, `${baseClassName}__item`)
      }))
    })
  });
};
var _default = exports.default = SwitchesPanel;