"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 IconContainer () {
        return IconContainer;
    },
    get LoadWrap () {
        return LoadWrap;
    },
    get Loader () {
        return Loader;
    },
    get StyledSpinner () {
        return StyledSpinner;
    },
    get base () {
        return base;
    }
});
const _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
const _react = require("@emotion/react");
const _mixins = require("../../../mixins");
const _engines = require("../../../engines");
const _Spinner = require("../../Spinner");
const _EmbeddedButtontokens = require("./EmbeddedButton.tokens");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const mergedConfig = (0, _engines.mergeConfig)(_Spinner.spinnerConfig);
const Spinner = (0, _engines.component)(mergedConfig);
const positionAlignItems = {
    center: 'center',
    'center-left': 'center',
    'center-right': 'center',
    top: 'start',
    'top-left': 'start',
    'top-right': 'start',
    bottom: 'end',
    'bottom-left': 'end',
    'bottom-right': 'end'
};
const positionJustifyItems = {
    center: 'center',
    'center-left': 'start',
    'center-right': 'end',
    top: 'center',
    'top-left': 'start',
    'top-right': 'end',
    bottom: 'center',
    'bottom-left': 'start',
    'bottom-right': 'end'
};
const LoadWrap = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e2v1quc0",
    label: "LoadWrap"
})("opacity:", ({ isLoading })=>isLoading ? `var(${_EmbeddedButtontokens.tokens.loadingIconOpacity})` : '1', ";display:grid;width:100%;height:100%;align-items:", ({ position })=>positionAlignItems[position], ";justify-items:", ({ position })=>positionJustifyItems[position], ";");
const IconContainer = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e2v1quc1",
    label: "IconContainer"
})("display:flex;align-items:center;justify-content:center;flex-shrink:0;");
const Loader = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "e2v1quc2",
    label: "Loader"
})("position:absolute;inset:0;display:flex;align-items:center;justify-content:center;");
const StyledSpinner = /*#__PURE__*/ (0, _styled.default)(Spinner, {
    target: "e2v1quc3",
    label: "StyledSpinner"
})(_Spinner.spinnerTokens.size, ":var(", _EmbeddedButtontokens.tokens.spinnerSize, ");", _Spinner.spinnerTokens.color, ":var(", _EmbeddedButtontokens.tokens.spinnerColor, ");");
const base = (0, /*#__PURE__*/ _react.css)("position:relative;display:block;width:100%;height:100%;border-radius:var(", _EmbeddedButtontokens.tokens.borderRadius, ");box-sizing:border-box;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);background:transparent;padding:0;a&{text-decoration:none;}:focus-visible{outline:none;}", (0, _mixins.addFocus)({
    outlineOffset: '0.125rem',
    outlineSize: '0.0625rem',
    outlineRadius: `var(${_EmbeddedButtontokens.tokens.borderRadius})`,
    outlineColor: `var(${_EmbeddedButtontokens.tokens.focusColor})`
}), "base");
