import { css } from "@emotion/react";
import styled from "@emotion/styled";
import { applyEllipsis, addFocus } from "../../mixins";
import { component, mergeConfig } from "../../engines";
import { spinnerConfig, spinnerTokens } from "../Spinner";
import { tokens } from "./LinkButton.tokens";
var mergedConfig = mergeConfig(spinnerConfig);
var Spinner = component(mergedConfig);
export var base = /*#__PURE__*/ css("position:relative;display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;text-decoration:none;appearance:none;outline:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);", addFocus({
    outlineOffset: '-0.125rem',
    outlineSize: '0.063rem',
    outlineRadius: "calc(0.125rem + var(".concat(tokens.linkButtonRadius, "))"),
    outlineColor: "var(".concat(tokens.linkButtonFocusColor, ")")
}), "base");
export var StyledAdditionalContent = /*#__PURE__*/ styled("div", {
    target: "e129zhl0",
    label: "StyledAdditionalContent"
})("display:flex;align-items:center;margin:var(", tokens.linkButtonAdditionalContentMargin, ");");
export var LoadWrap = /*#__PURE__*/ styled("div", {
    target: "e129zhl1",
    label: "LoadWrap"
})("opacity:", function(param) {
    var isLoading = param.isLoading;
    return isLoading ? '0.06' : '1';
}, ";display:flex;align-items:inherit;justify-content:inherit;height:100%;width:100%;");
export var Loader = /*#__PURE__*/ styled("div", {
    target: "e129zhl2",
    label: "Loader"
})("position:absolute;");
export var StyledSpinner = /*#__PURE__*/ styled(Spinner, {
    target: "e129zhl3",
    label: "StyledSpinner"
})(spinnerTokens.size, ":var(", tokens.linkButtonSpinnerSize, ");", spinnerTokens.color, ":var(", tokens.linkButtonSpinnerColor, ");");
export var LinkButtonText = /*#__PURE__*/ styled("span", {
    target: "e129zhl4",
    label: "LinkButtonText"
})("padding:var(", tokens.linkButtonTextPadding, ");color:var(", tokens.linkButtonTextColor, ");", applyEllipsis(), "    &:hover{color:var(", tokens.linkButtonTextColorHover, ");}&:active{color:var(", tokens.linkButtonTextColorActive, ");}");
export var StyledContentLeft = /*#__PURE__*/ styled("div", {
    target: "e129zhl5",
    label: "StyledContentLeft"
})("line-height:0;color:var(", tokens.linkButtonIconColor, ");margin:", function(param) {
    var hasContent = param.hasContent;
    return hasContent ? "var(".concat(tokens.linkButtonLeftContentMargin, ")") : '0';
}, ";");
export var StyledContentRight = /*#__PURE__*/ styled("div", {
    target: "e129zhl6",
    label: "StyledContentRight"
})("line-height:0;color:var(", tokens.linkButtonIconColor, ");margin:", function(param) {
    var hasContent = param.hasContent;
    return hasContent ? "var(".concat(tokens.linkButtonRightContentMargin, ")") : '0';
}, ";");
