"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Textarea = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
require("../styles/textarea.css");
require("../styles/main.css");
var _excluded = ["placeholder", "value", "type", "disabled", "isRequired", "isInvalid", "isFullWidth"];
var Textarea = function Textarea(_ref) {
  var placeholder = _ref.placeholder,
    value = _ref.value,
    type = _ref.type,
    disabled = _ref.disabled,
    isRequired = _ref.isRequired,
    isInvalid = _ref.isInvalid,
    isFullWidth = _ref.isFullWidth,
    props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var fullWidth = isFullWidth && 'full-width';
  var invalid = isInvalid && 'invalid';
  return /*#__PURE__*/_react.default.createElement("textarea", Object.assign({
    placeholder: placeholder,
    value: value,
    type: type,
    required: isRequired,
    disabled: disabled,
    className: [fullWidth, invalid].join(' ')
  }, props));
};
exports.Textarea = Textarea;
Textarea.defaultProps = {
  placeholder: "Placeholder",
  value: "",
  type: "text",
  disabled: false,
  isRequired: false,
  isInvalid: false,
  isFullWidth: false
};