'use strict';

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { Button } from './Button';
import { Icon } from './Icon';
export var MoreButton =
/*#__PURE__*/
function (_React$Component) {
  _inheritsLoose(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 = _objectWithoutPropertiesLoose(_this$props, ["className", "placeholder", "children"]);

    var buttonClassName = classnames(className, 'form-control text-left more-button');
    var labelClassName = classnames('more-label', {
      placeholder: !children && placeholder
    });
    return React.createElement(Button, _extends({
      className: buttonClassName
    }, props), React.createElement("div", {
      className: labelClassName
    }, React.createElement(Icon, {
      name: "chevron-right-big",
      className: "pull-right"
    }), children || placeholder));
  };

  return MoreButton;
}(React.Component);

_defineProperty(MoreButton, "defaultProps", {
  className: '',
  children: null,
  placeholder: ''
});

_defineProperty(MoreButton, "propTypes", {
  className: PropTypes.string,
  children: PropTypes.node,
  placeholder: PropTypes.string
});