"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _draggableList = _interopRequireDefault(require("../draggable-list"));
var _setupSection = _interopRequireDefault(require("../setup-section"));
var _loader = _interopRequireDefault(require("../../atom/loader"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Loading = () => /*#__PURE__*/_react.default.createElement("div", {
  className: _style.default.loading
}, /*#__PURE__*/_react.default.createElement(_loader.default, null));
const SetupSections = ({
  sections,
  loading,
  onDrop
}) => {
  if (loading) return /*#__PURE__*/_react.default.createElement(Loading, null);
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_draggableList.default, {
    itemType: "setup-section",
    items: sections,
    onDrop: onDrop
  }));
};
SetupSections.propTypes = process.env.NODE_ENV !== "production" ? {
  sections: _propTypes.default.arrayOf(_propTypes.default.shape(_setupSection.default.propTypes)),
  loading: _propTypes.default.bool,
  onDrop: _propTypes.default.func
} : {};
var _default = exports.default = SetupSections;
//# sourceMappingURL=index.js.map