// Copyright 1999-2023. Plesk International GmbH. All rights reserved.

import { Children, cloneElement } from 'react';
import classNames from 'classnames';
import { CLS_PREFIX } from '../../constants';
import Section from '../Section';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * `SwitchesPanel` component is used for grouping several [SwitchesPanelItems](#!/SwitchesPanelItem) into one set.
 * @since 0.3.0
 */
const SwitchesPanel = _ref => {
  let {
    baseClassName = `${CLS_PREFIX}switches-panel`,
    className,
    children,
    ...props
  } = _ref;
  return /*#__PURE__*/_jsx(Section, {
    className: classNames(baseClassName, className),
    ...props,
    children: /*#__PURE__*/_jsx("div", {
      className: `${baseClassName}__items`,
      children: children && Children.map(children, child => /*#__PURE__*/cloneElement(child, {
        className: classNames(child.props.className, `${baseClassName}__item`)
      }))
    })
  });
};
export default SwitchesPanel;