"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Input = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
require("../styles/input.css");
require("../styles/main.css");
var _excluded = ["placeholder", "value", "type", "disabled", "isInvalid", "isFullWidth"];
var Input = function Input(_ref) {
  var placeholder = _ref.placeholder,
    value = _ref.value,
    type = _ref.type,
    disabled = _ref.disabled,
    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("input", Object.assign({
    placeholder: placeholder,
    value: value,
    type: type,
    disabled: disabled,
    className: [fullWidth, invalid].join(' ')
  }, props));
};
exports.Input = Input;
Input.defaultProps = {
  placeholder: "Placeholder",
  value: "",
  type: "text",
  disabled: false,
  isInvalid: false,
  isFullWidth: false
};