"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;
    }
});
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
const _mixins = require("../../mixins");
const _engines = require("../../engines");
const _Spinner = require("../Spinner");
const _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;
}
const mergedConfig = (0, _engines.mergeConfig)(_Spinner.spinnerConfig);
const Spinner = (0, _engines.component)(mergedConfig);
const 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: `var(${_LinkButtontokens.tokens.linkButtonRadius})`,
    outlineColor: `var(${_LinkButtontokens.tokens.linkButtonFocusColor})`
}));
const StyledAdditionalContent = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledAdditionalContent",
    componentId: "sc-f4ed9abb-0"
})([
    `display:flex;align-items:center;margin:var(`,
    `);`
], _LinkButtontokens.tokens.linkButtonAdditionalContentMargin);
const LoadWrap = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__LoadWrap",
    componentId: "sc-f4ed9abb-1"
})([
    `opacity:`,
    `;display:flex;align-items:inherit;justify-content:inherit;height:100%;width:100%;`
], ({ isLoading })=>isLoading ? '0.06' : '1');
const Loader = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__Loader",
    componentId: "sc-f4ed9abb-2"
})([
    `position:absolute;`
]);
const StyledSpinner = (0, _styledcomponents.default)(Spinner).withConfig({
    displayName: "LinkButton.styles__StyledSpinner",
    componentId: "sc-f4ed9abb-3"
})([
    ``,
    `:var(`,
    `);`,
    `:var(`,
    `);`
], _Spinner.spinnerTokens.size, _LinkButtontokens.tokens.linkButtonSpinnerSize, _Spinner.spinnerTokens.color, _LinkButtontokens.tokens.linkButtonSpinnerColor);
const LinkButtonText = _styledcomponents.default.span.withConfig({
    displayName: "LinkButton.styles__LinkButtonText",
    componentId: "sc-f4ed9abb-4"
})([
    `padding:var(`,
    `);color:var(`,
    `);`,
    ``
], _LinkButtontokens.tokens.linkButtonTextPadding, _LinkButtontokens.tokens.linkButtonTextColor, (0, _mixins.applyEllipsis)());
const StyledContentLeft = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledContentLeft",
    componentId: "sc-f4ed9abb-5"
})([
    `line-height:0;color:var(`,
    `);margin:`,
    `;`
], _LinkButtontokens.tokens.linkButtonIconColor, ({ hasContent })=>hasContent ? `var(${_LinkButtontokens.tokens.linkButtonLeftContentMargin})` : '0');
const StyledContentRight = _styledcomponents.default.div.withConfig({
    displayName: "LinkButton.styles__StyledContentRight",
    componentId: "sc-f4ed9abb-6"
})([
    `line-height:0;color:var(`,
    `);margin:`,
    `;`
], _LinkButtontokens.tokens.linkButtonIconColor, ({ hasContent })=>hasContent ? `var(${_LinkButtontokens.tokens.linkButtonRightContentMargin})` : '0');
