"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 StyledRoot () {
        return StyledRoot;
    },
    get Toast () {
        return Toast;
    }
});
var _react = /*#__PURE__*/ _interop_require_default(require("react"));
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
var _mixins = require("../../mixins");
var _tokens = require("../../tokens");
var _Typography = require("../Typography");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
var StyledRoot = (0, _styledcomponents.default)(_Typography.Footnote1).withConfig({
    displayName: "Toast__StyledRoot",
    componentId: "sc-d40fdfda-0"
})([
    "display:inline-flex;align-items:center;padding:0.6875rem 1.25rem;border-radius:1.5rem;background:",
    ";color:",
    ";",
    ";"
], _tokens.dark02, _tokens.white, _mixins.applyNoSelect);
var StyledContent = _styledcomponents.default.div.withConfig({
    displayName: "Toast__StyledContent",
    componentId: "sc-d40fdfda-1"
})([
    "display:flex;align-items:center;margin-right:0.5rem;"
]);
var Toast = function Toast(param) {
    var _param_role = param.role, role = _param_role === void 0 ? 'status' : _param_role, text = param.text, contentLeft = param.contentLeft;
    var ariaLive = 'polite';
    var ariaAtomic = false;
    if (role === 'alert') {
        ariaLive = 'assertive';
    } else if (role === 'status') {
        ariaAtomic = true;
    }
    return /*#__PURE__*/ _react.default.createElement(StyledRoot, {
        role: role,
        "aria-live": ariaLive,
        "aria-atomic": ariaAtomic
    }, contentLeft && /*#__PURE__*/ _react.default.createElement(StyledContent, null, contentLeft), text);
};
