"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 CloseIconWrapper () {
        return CloseIconWrapper;
    },
    get StyledContent () {
        return StyledContent;
    },
    get StyledContentLeft () {
        return StyledContentLeft;
    },
    get StyledOverlay () {
        return StyledOverlay;
    },
    get StyledRoot () {
        return StyledRoot;
    },
    get base () {
        return base;
    }
});
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
const _Overlay = require("../Overlay");
const _Button = require("../Button");
const _utils = require("./utils");
const _Toasttokens = require("./Toast.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 base = (0, _styledcomponents.css)([
    `display:inline-flex;align-items:center;flex-shrink:0;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);`,
    `:1rem;`
], _Button.buttonTokens.buttonWidth);
const StyledRoot = _styledcomponents.default.div.withConfig({
    displayName: "Toast.styles__StyledRoot",
    componentId: "sc-38e2d0b0-0"
})([
    `position:fixed;left:50%;transform:translateX(-50%);z-index:`,
    `;display:flex;width:0;top:`,
    `;bottom:`,
    `;&.`,
    `{animation:0.3s showToastAnimation ease-out forwards;}&.`,
    `{animation:0.3s hideToastAnimation ease-out forwards;}@keyframes showToastAnimation{0%{transform:`,
    `;opacity:0;}80%{transform:translate(-50%,0);opacity:0.7;}100%{opacity:1;}}@keyframes hideToastAnimation{0%{opacity:1;}20%{transform:translate(-50%,0);opacity:0.7;}100%{transform:`,
    `;opacity:0;}}`
], _utils.TOAST_Z_INDEX, ({ position, offset = 0 })=>position === 'top' ? `${Number(offset) + 5}rem` : 'unset', ({ position, offset = 0 })=>position === 'bottom' ? `${Number(offset) + 5}rem` : 'unset', String(_Toasttokens.classes.toastShowed), String(_Toasttokens.classes.toastHidden), ({ position })=>`translate(-50%, ${position === 'top' ? '-' : ''}5rem)`, ({ position })=>`translate(-50%, ${position === 'top' ? '-' : ''}5rem)`);
const CloseIconWrapper = (0, _styledcomponents.default)(_utils.Button).withConfig({
    displayName: "Toast.styles__CloseIconWrapper",
    componentId: "sc-38e2d0b0-1"
})([
    `height:var(`,
    `);--plasma_private-close-icon-margin:var(`,
    `);margin:var(--plasma_private-close-icon-margin);color:var(`,
    `);:hover{color:var(`,
    `);}`
], _Toasttokens.tokens.closeIconButtonSize, _Toasttokens.tokens.closeIconMargin, _Toasttokens.tokens.closeIconColor, _Toasttokens.tokens.closeIconColorOnHover);
const StyledOverlay = (0, _styledcomponents.default)(_Overlay.Overlay).withConfig({
    displayName: "Toast.styles__StyledOverlay",
    componentId: "sc-38e2d0b0-2"
})([
    `&&.`,
    `{animation:0.3s showFadeAnimation ease-out forwards;}&&.`,
    `{animation:0.3s hideFadeAnimation ease-out forwards;}@keyframes showFadeAnimation{0%{opacity:0;}100%{opacity:1;}}@keyframes hideFadeAnimation{0%{opacity:1;}100%{opacity:0;}}`
], String(_Toasttokens.classes.toastFadeShowed), String(_Toasttokens.classes.toastFadeHidden));
const StyledContentLeft = _styledcomponents.default.div.withConfig({
    displayName: "Toast.styles__StyledContentLeft",
    componentId: "sc-38e2d0b0-3"
})([
    `display:flex;--plasma_private-content-left-margin:var(`,
    `);margin:var(--plasma_private-content-left-margin);color:var(`,
    `);`
], _Toasttokens.tokens.contentLeftMargin, _Toasttokens.tokens.contentLeftColor);
const StyledContent = _styledcomponents.default.div.withConfig({
    displayName: "Toast.styles__StyledContent",
    componentId: "sc-38e2d0b0-4"
})([
    `color:`,
    `;`
], ({ textColor })=>textColor || 'currentColor');
