'use strict';

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

var _templateObject = _taggedTemplateLiteral(['\n  ', ';\n'], ['\n  ', ';\n']),
    _templateObject2 = _taggedTemplateLiteral(['\n  ', '\n'], ['\n  ', '\n']);

var _ExternalTextAnchor = require('./ExternalTextAnchor');

var _ExternalTextAnchor2 = _interopRequireDefault(_ExternalTextAnchor);

var _styledComponents = require('styled-components');

var _themeGet = require('../../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

var _icons = require('../../Icon/icons');

var _icons2 = _interopRequireDefault(_icons);

var _Icon = require('../../Icon');

var _Icon2 = _interopRequireDefault(_Icon);

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

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var iconStyles = (0, _styledComponents.css)(['text-decoration:none;display:inline-block;text-transform:uppercase;font-weight:700;&::after{opacity:0;}&::before{font-family:', ';content:', ';font-weight:normal;margin-right:', ';}& > ', '{font-weight:normal;}'], (0, _themeGet2.default)('fonts.icon'), function (_ref) {
  var icon = _ref.icon;
  return !!icon ? '"' + (0, _icons2.default)(icon) + '"' : '';
}, function (_ref2) {
  var icon = _ref2.icon,
      children = _ref2.children;
  return !!icon && !!children ? '0.5em' : '0';
}, _Icon2.default);

var ExternalIconAnchor = _ExternalTextAnchor2.default.extend(_templateObject, iconStyles);

ExternalIconAnchor.Danger = ExternalIconAnchor.Negative = _ExternalTextAnchor2.default.Danger.extend(_templateObject2, iconStyles);

ExternalIconAnchor.Positive = _ExternalTextAnchor2.default.Positive.extend(_templateObject2, iconStyles);

ExternalIconAnchor.Dark = _ExternalTextAnchor2.default.Dark.extend(_templateObject2, iconStyles);

ExternalIconAnchor.Inverted = _ExternalTextAnchor2.default.Inverted.extend(_templateObject2, iconStyles);

exports.default = ExternalIconAnchor;