'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Links = require('../Links');

var _Images = require('../Images');

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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var Badge = function Badge(_ref) {
  var props = _objectWithoutProperties(_ref, []);

  var type = props.type;

  switch (type) {
    case 'applestore':
      return _react2.default.createElement(
        _Links.Link,
        { href: 'https://itunes.apple.com/us/app/blockchain-bitcoin-wallet/id493253309', target: '_blank' },
        _react2.default.createElement(_Images.Image, { name: 'app-store-badge', height: '40px' })
      );
    case 'googleplay':
      return _react2.default.createElement(
        _Links.Link,
        { href: 'https://play.google.com/store/apps/details?id=piuk.blockchain.android', target: '_blank' },
        _react2.default.createElement(_Images.Image, { name: 'google-play-badge', height: '40px' })
      );
    default:
      return _react2.default.createElement('div', null);
  }
};

Badge.propTypes = {
  type: _propTypes2.default.oneOf(['applestore', 'googleplay']).isRequired
};

exports.default = Badge;