"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get LinkButtonText () {
        return LinkButtonText;
    },
    get LoadWrap () {
        return LoadWrap;
    },
    get Loader () {
        return Loader;
    },
    get StyledAdditionalContent () {
        return StyledAdditionalContent;
    },
    get StyledContentLeft () {
        return StyledContentLeft;
    },
    get StyledContentRight () {
        return StyledContentRight;
    },
    get StyledSpinner () {
        return StyledSpinner;
    },
    get base () {
        return base;
    }
});
var _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
var _mixins = require("../../mixins");
var _engines = require("../../engines");
var _Spinner = require("../Spinner");
var _LinkButtontokens = require("./LinkButton.tokens");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
var mergedConfig = (0, _engines.mergeConfig)(_Spinner.spinnerConfig);
var Spinner = (0, _engines.component)(mergedConfig);
var base = (0, _styledcomponents.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);",
    ""
], (0, _mixins.addFocus)({
    outlineOffset: '-0.125rem',
    outlineSize: '0.063rem',
    outlineRadius: "calc(0.125rem + var(".concat(_LinkButtontokens.tokens.linkButtonRadius, "))"),
    outlineColor: "var(".concat(_LinkButtontokens.tokens.linkButtonFocusColor, ")")
}));
var StyledAdditionalContent = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledAdditionalContent",
    componentId: "sc-f97b8dcf-0"
})([
    "display:flex;align-items:center;margin:var(",
    ");"
], _LinkButtontokens.tokens.linkButtonAdditionalContentMargin);
var LoadWrap = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__LoadWrap",
    componentId: "sc-f97b8dcf-1"
})([
    "opacity:",
    ";display:flex;align-items:inherit;justify-content:inherit;height:100%;width:100%;"
], function(param) {
    var isLoading = param.isLoading;
    return isLoading ? '0.06' : '1';
});
var Loader = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__Loader",
    componentId: "sc-f97b8dcf-2"
})([
    "position:absolute;"
]);
var StyledSpinner = (0, _styledcomponents.default)(Spinner).withConfig({
    displayName: "LinkButton.styles__StyledSpinner",
    componentId: "sc-f97b8dcf-3"
})([
    "",
    ":var(",
    ");",
    ":var(",
    ");"
], _Spinner.spinnerTokens.size, _LinkButtontokens.tokens.linkButtonSpinnerSize, _Spinner.spinnerTokens.color, _LinkButtontokens.tokens.linkButtonSpinnerColor);
var LinkButtonText = _styledcomponents.default.span.withConfig({
    displayName: "LinkButton.styles__LinkButtonText",
    componentId: "sc-f97b8dcf-4"
})([
    "padding:var(",
    ");color:var(",
    ");",
    " &:hover{color:var(",
    ");}&:active{color:var(",
    ");}"
], _LinkButtontokens.tokens.linkButtonTextPadding, _LinkButtontokens.tokens.linkButtonTextColor, (0, _mixins.applyEllipsis)(), _LinkButtontokens.tokens.linkButtonTextColorHover, _LinkButtontokens.tokens.linkButtonTextColorActive);
var StyledContentLeft = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledContentLeft",
    componentId: "sc-f97b8dcf-5"
})([
    "line-height:0;color:var(",
    ");margin:",
    ";"
], _LinkButtontokens.tokens.linkButtonIconColor, function(param) {
    var hasContent = param.hasContent;
    return hasContent ? "var(".concat(_LinkButtontokens.tokens.linkButtonLeftContentMargin, ")") : '0';
});
var StyledContentRight = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledContentRight",
    componentId: "sc-f97b8dcf-6"
})([
    "line-height:0;color:var(",
    ");margin:",
    ";"
], _LinkButtontokens.tokens.linkButtonIconColor, function(param) {
    var hasContent = param.hasContent;
    return hasContent ? "var(".concat(_LinkButtontokens.tokens.linkButtonRightContentMargin, ")") : '0';
});
