Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/shared/components/Panel.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/icon', '@frontend-taglib-clay$clayui/layout', '@frontend-taglib-clay$clayui/tooltip', 'frontend-js-react-web$classnames', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _icon = _interopRequireDefault(require("@frontend-taglib-clay$clayui/icon"));

    var _layout = _interopRequireDefault(require("@frontend-taglib-clay$clayui/layout"));

    var _tooltip = require("@frontend-taglib-clay$clayui/tooltip");

    var _classnames = _interopRequireDefault(require("frontend-js-react-web$classnames"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var Body = function Body(_ref) {
      var children = _ref.children,
          elementClasses = _ref.elementClasses;
      var classes = (0, _classnames.default)('panel-body', elementClasses);

      if (!children) {
        return null;
      }

      return (/*#__PURE__*/_react.default.createElement("div", {
          className: classes
        }, children)
      );
    };

    var Footer = function Footer(_ref2) {
      var children = _ref2.children,
          elementClasses = _ref2.elementClasses,
          label = _ref2.label;
      var classes = (0, _classnames.default)('panel-footer', elementClasses);

      if (!children) {
        return null;
      }

      return (/*#__PURE__*/_react.default.createElement("div", {
          className: classes
        }, label && /*#__PURE__*/_react.default.createElement("div", null, label), !!children && /*#__PURE__*/_react.default.createElement("div", null, children))
      );
    };

    var Header = function Header(_ref3) {
      var children = _ref3.children,
          elementClasses = _ref3.elementClasses,
          title = _ref3.title;
      var classes = (0, _classnames.default)('panel-header', elementClasses);
      return (/*#__PURE__*/_react.default.createElement("div", {
          className: classes
        }, title && /*#__PURE__*/_react.default.createElement("div", {
          className: "panel-title"
        }, title), !!children && /*#__PURE__*/_react.default.createElement("div", null, children))
      );
    };

    var HeaderWithOptions = function HeaderWithOptions(_ref4) {
      var children = _ref4.children,
          description = _ref4.description,
          elementClasses = _ref4.elementClasses,
          title = _ref4.title,
          _ref4$tooltipPosition = _ref4.tooltipPosition,
          tooltipPosition = _ref4$tooltipPosition === void 0 ? 'right' : _ref4$tooltipPosition;
      return (/*#__PURE__*/_react.default.createElement(Header, {
          elementClasses: elementClasses
        }, /*#__PURE__*/_react.default.createElement(_layout.default.ContentRow, null, /*#__PURE__*/_react.default.createElement(_layout.default.ContentRow, {
          className: "flex-row",
          expand: true
        }, /*#__PURE__*/_react.default.createElement("span", {
          className: "mr-2"
        }, title), /*#__PURE__*/_react.default.createElement(_tooltip.ClayTooltipProvider, null, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
          className: "workflow-tooltip",
          "data-tooltip-align": tooltipPosition,
          title: description
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          symbol: "question-circle-full"
        }))))), children))
      );
    };

    var Panel = function Panel(_ref5) {
      var children = _ref5.children,
          elementClasses = _ref5.elementClasses;
      var classes = (0, _classnames.default)('panel', 'panel-secondary', elementClasses);
      return (/*#__PURE__*/_react.default.createElement(_layout.default.ContainerFluid, {
          className: "mt-4"
        }, /*#__PURE__*/_react.default.createElement("div", {
          className: classes
        }, children))
      );
    };

    Panel.Body = Body;
    Panel.Footer = Footer;
    Panel.Header = Header;
    Panel.HeaderWithOptions = HeaderWithOptions;
    var _default = Panel;
    exports.default = _default;
    //# sourceMappingURL=Panel.es.js.map
  }
});
//# sourceMappingURL=Panel.es.js.map