"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "CodeType", {
  enumerable: true,
  get: function get() {
    return _enum.CodeType;
  }
});
exports["default"] = void 0;

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

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

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

var _QRCode = _interopRequireDefault(require("./QRCode"));

var _BarCode = _interopRequireDefault(require("./BarCode"));

var _enum = require("./enum");

var _excluded = ["type"];

var QRBarCode = function QRBarCode(props) {
  var _props$type = props.type,
      type = _props$type === void 0 ? _enum.CodeType.QR : _props$type,
      rest = (0, _objectWithoutProperties2["default"])(props, _excluded);

  if (type === _enum.CodeType.QR) {
    return /*#__PURE__*/_react["default"].createElement(_QRCode["default"], (0, _extends2["default"])({}, rest));
  }

  return /*#__PURE__*/_react["default"].createElement(_BarCode["default"], (0, _extends2["default"])({}, rest));
};

var _default = QRBarCode;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
