"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.euiLinkStyles = exports.euiLinkHoverCSS = exports.euiLinkFocusCSS = exports.euiLinkCSS = void 0;
var _react = require("@emotion/react");
var _global_styling = require("../../global_styling");
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
                                                                                                                                                                                                                                                                                           * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
                                                                                                                                                                                                                                                                                           * or more contributor license agreements. Licensed under the Elastic License
                                                                                                                                                                                                                                                                                           * 2.0 and the Server Side Public License, v 1; you may not use this file except
                                                                                                                                                                                                                                                                                           * in compliance with, at your election, the Elastic License 2.0 or the Server
                                                                                                                                                                                                                                                                                           * Side Public License, v 1.
                                                                                                                                                                                                                                                                                           */
var _colorCSS = function _colorCSS(color) {
  return "\n    color: ".concat(color, ";\n\n    &:target {\n      color: darken(").concat(color, ", 10%);\n    }\n  ");
};
var euiLinkHoverCSS = function euiLinkHoverCSS() {
  return "\n    text-decoration: underline;\n  ";
};
exports.euiLinkHoverCSS = euiLinkHoverCSS;
var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
  return "\n    text-decoration: underline;\n    text-decoration-thickness: ".concat(euiTheme.border.width.thick, ";\n  ");
};
exports.euiLinkFocusCSS = euiLinkFocusCSS;
var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
  var euiTheme = euiThemeContext.euiTheme;
  return "\n    font-weight: ".concat(euiTheme.font.weight.medium, ";\n    ").concat((0, _global_styling.logicalTextAlignCSS)('left'), "\n\n    &:hover {\n      ").concat(euiLinkHoverCSS(), "\n    }\n\n    &:focus {\n      ").concat((0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), "\n      ").concat(euiLinkFocusCSS(euiTheme), "\n    }\n  ");
};
exports.euiLinkCSS = euiLinkCSS;
var _ref = process.env.NODE_ENV === "production" ? {
  name: "9njbi5-disabled",
  styles: "font-weight:inherit;&:hover{cursor:auto;}&:hover,&:focus,&:target{text-decoration:none;};label:disabled;"
} : {
  name: "9njbi5-disabled",
  styles: "font-weight:inherit;&:hover{cursor:auto;}&:hover,&:focus,&:target{text-decoration:none;};label:disabled;",
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
  var euiTheme = euiThemeContext.euiTheme;
  return {
    euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
    disabled: _ref,
    // Color styles
    primary: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.primaryText), ";label:primary;"),
    subdued: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.subduedText), ";label:subdued;"),
    success: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.successText), ";label:success;"),
    accent: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.accentText), ";label:accent;"),
    danger: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.dangerText), ";label:danger;"),
    warning: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.warningText), ";label:warning;"),
    ghost: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.ghost), ";label:ghost;"),
    text: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.text), ";label:text;"),
    // Children
    euiLink__screenReaderText: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '0px'), ";;label:euiLink__screenReaderText;"),
    euiLink__externalIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:euiLink__externalIcon;")
  };
};
exports.euiLinkStyles = euiLinkStyles;