"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.InputRightAddon = exports.InputLeftAddon = exports.InputAddon = void 0;

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

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

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

var _Box = require("../Box");

var _styles = _interopRequireDefault(require("../Input/styles"));

var _styles2 = _interopRequireDefault(require("./styles"));

var __jsx = _react["default"].createElement;

var InputAddon = function InputAddon(_ref) {
  var _ref$placement = _ref.placement,
      placement = _ref$placement === void 0 ? 'left' : _ref$placement,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? 'md' : _ref$size,
      props = (0, _objectWithoutProperties2["default"])(_ref, ["placement", "size"]);
  var inputStyleProps = (0, _styles["default"])({
    size: size,
    variant: 'outline'
  });
  var inputAddonStyleProps = (0, _styles2["default"])({
    placement: placement
  });
  return __jsx(_Box.Box, (0, _extends2["default"])({}, inputStyleProps, inputAddonStyleProps, props));
};

exports.InputAddon = InputAddon;

var InputLeftAddon = function InputLeftAddon(props) {
  return __jsx(InputAddon, (0, _extends2["default"])({
    placement: "left"
  }, props));
};

exports.InputLeftAddon = InputLeftAddon;

var InputRightAddon = function InputRightAddon(props) {
  return __jsx(InputAddon, (0, _extends2["default"])({
    placement: "right"
  }, props));
};

exports.InputRightAddon = InputRightAddon;
//# sourceMappingURL=InputAddon.js.map