'use strict';

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.MoreButton = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));

var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _classnames = _interopRequireDefault(require("classnames"));

var _Button = require("./Button");

var _Icon = require("./Icon");

var MoreButton =
/*#__PURE__*/
function (_React$Component) {
  (0, _inheritsLoose2.default)(MoreButton, _React$Component);

  function MoreButton() {
    return _React$Component.apply(this, arguments) || this;
  }

  var _proto = MoreButton.prototype;

  _proto.render = function render() {
    var _this$props = this.props,
        className = _this$props.className,
        placeholder = _this$props.placeholder,
        children = _this$props.children,
        props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["className", "placeholder", "children"]);
    var buttonClassName = (0, _classnames.default)(className, 'form-control text-left more-button');
    var labelClassName = (0, _classnames.default)('more-label', {
      placeholder: !children && placeholder
    });
    return _react.default.createElement(_Button.Button, (0, _extends2.default)({
      className: buttonClassName
    }, props), _react.default.createElement("div", {
      className: labelClassName
    }, _react.default.createElement(_Icon.Icon, {
      name: "chevron-right-big",
      className: "pull-right"
    }), children || placeholder));
  };

  return MoreButton;
}(_react.default.Component);

exports.MoreButton = MoreButton;
(0, _defineProperty2.default)(MoreButton, "defaultProps", {
  className: '',
  children: null,
  placeholder: ''
});
(0, _defineProperty2.default)(MoreButton, "propTypes", {
  className: _propTypes.default.string,
  children: _propTypes.default.node,
  placeholder: _propTypes.default.string
});