'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getDevice = exports.DEFAULT_DEVICE = undefined;

var _mobileDetect = require('mobile-detect');

var _mobileDetect2 = _interopRequireDefault(_mobileDetect);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var DEFAULT_DEVICE = exports.DEFAULT_DEVICE = 'desktop';

var getDevice = exports.getDevice = function getDevice(userAgent) {
  var md = new _mobileDetect2.default(userAgent);
  var device = DEFAULT_DEVICE;
  if (md.tablet()) {
    device = 'tablet';
  } else if (md.mobile()) {
    device = 'mobile';
  }
  return device;
};