Liferay.Loader.define("layout-content-page-editor-web@2.0.110/page_editor/plugins/comments/components/ResolveButton", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/button', '@frontend-taglib-clay$clayui/icon', 'frontend-js-react-web$classnames', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', '../../../common/components/Loader'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = ResolveButton;

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

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

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

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

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

    var _Loader = _interopRequireDefault(require("../../../common/components/Loader"));

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    function ResolveButton(_ref) {
      var _ref$disabled = _ref.disabled,
          disabled = _ref$disabled === void 0 ? false : _ref$disabled,
          loading = _ref.loading,
          onClick = _ref.onClick,
          resolved = _ref.resolved;

      var icon = /*#__PURE__*/_react.default.createElement("span", {
        className: "text-lowercase"
      }, /*#__PURE__*/_react.default.createElement(_icon.default, {
        symbol: "check-circle"
      }));

      var title = Liferay.Language.get('resolve');

      if (loading) {
        title = undefined;
        icon = /*#__PURE__*/_react.default.createElement(_Loader.default, null);
      } else if (resolved) {
        icon = /*#__PURE__*/_react.default.createElement("span", {
          className: "text-lowercase text-success"
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          symbol: "check-circle-full"
        }));
        title = Liferay.Language.get('reopen');
      }

      return (/*#__PURE__*/_react.default.createElement(_button.default, {
          borderless: true,
          className: (0, _classnames.default)('flex-shrink-0', {
            'lfr-portal-tooltip': !!title
          }),
          "data-title": title,
          disabled: disabled || loading,
          displayType: "secondary",
          monospaced: true,
          onClick: onClick,
          outline: true,
          small: true
        }, icon)
      );
    }
    //# sourceMappingURL=ResolveButton.js.map
  }
});
//# sourceMappingURL=ResolveButton.js.map