'use strict';

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

var _taggedTemplateLiteral2 = require('babel-runtime/helpers/taggedTemplateLiteral');

var _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2);

var _templateObject = (0, _taggedTemplateLiteral3.default)(['\n  text-decoration: none;\n  text-transform: uppercase;\n  font-weight: 700;\n\n  &::after {\n    opacity: ', ';\n  }\n\n  &::before {\n    font-family: ', ';\n    content: ', ';\n    font-weight: normal;\n    margin-right: ', ';\n  }\n\n  & > ', ' {\n    font-weight: normal;\n  }\n'], ['\n  text-decoration: none;\n  text-transform: uppercase;\n  font-weight: 700;\n\n  &::after {\n    opacity: ', ';\n  }\n\n  &::before {\n    font-family: ', ';\n    content: ', ';\n    font-weight: normal;\n    margin-right: ', ';\n  }\n\n  & > ', ' {\n    font-weight: normal;\n  }\n']);

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

var _ExternalTextAnchor2 = _interopRequireDefault(_ExternalTextAnchor);

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

var _styledComponents2 = _interopRequireDefault(_styledComponents);

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);

var _sharedStyles = require('./sharedStyles');

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

var iconStyles = (0, _styledComponents.css)(_templateObject, function (_ref) {
  var appearFocused = _ref.appearFocused;
  return appearFocused ? 0.125 : 0;
}, (0, _themeGet2.default)('fonts.icon'), function (_ref2) {
  var icon = _ref2.icon;
  return !!icon ? '"' + (0, _icons2.default)(icon) + '"' : '';
}, function (_ref3) {
  var icon = _ref3.icon,
      children = _ref3.children;
  return !!icon && !!children ? '0.35em' : '0';
}, _Icon2.default);

var ExternalIconAnchor = _styledComponents2.default.a.withConfig({
  displayName: 'ExternalIconAnchor'
})(['', ' ', ';'], _sharedStyles.base, iconStyles);

ExternalIconAnchor.Negative = _styledComponents2.default.a.withConfig({
  displayName: 'ExternalIconAnchor__Negative'
})(['', ' ', ';', ';'], _sharedStyles.base, iconStyles, _sharedStyles.negative);
ExternalIconAnchor.Danger = ExternalIconAnchor.Negative;

ExternalIconAnchor.Positive = _styledComponents2.default.a.withConfig({
  displayName: 'ExternalIconAnchor__Positive'
})(['', ' ', ';', ';'], _sharedStyles.base, iconStyles, _sharedStyles.positive);

ExternalIconAnchor.Dark = _styledComponents2.default.a.withConfig({
  displayName: 'ExternalIconAnchor__Dark'
})(['', ' ', ';', ';'], _sharedStyles.base, iconStyles, _sharedStyles.dark);

ExternalIconAnchor.Inverted = _styledComponents2.default.a.withConfig({
  displayName: 'ExternalIconAnchor__Inverted'
})(['', ' ', ';', ';'], _sharedStyles.base, iconStyles, _sharedStyles.inverted);

exports.default = ExternalIconAnchor;