"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var theme_1 = require("../middleware/theme");
var vdom_1 = require("@dojo/framework/core/vdom");
var css = require("../theme/default/snackbar.m.css");
var fixedCss = require("./styles/snackbar.m.css");
var factory = vdom_1.create({ theme: theme_1.default })
    .properties()
    .children();
exports.Snackbar = factory(function Snackbar(_a) {
    var theme = _a.middleware.theme, properties = _a.properties, children = _a.children;
    var _b = properties(), type = _b.type, open = _b.open, leading = _b.leading, stacked = _b.stacked;
    var _c = children()[0], message = _c.message, actions = _c.actions;
    var themeCss = theme.classes(css);
    return (vdom_1.tsx("div", { key: "root", classes: [
            theme.variant(),
            themeCss.root,
            fixedCss.root,
            open ? themeCss.open : null,
            type ? themeCss[type] : null,
            leading ? themeCss.leading : null,
            stacked ? themeCss.stacked : null
        ] },
        vdom_1.tsx("div", { key: "content", classes: themeCss.content },
            vdom_1.tsx("div", { key: "label", classes: themeCss.label, role: "status", "aria-live": "polite" }, message),
            actions && (vdom_1.tsx("div", { key: "actions", classes: themeCss.actions }, actions)))));
});
exports.default = exports.Snackbar;

/*# sourceMappingURL=index.js.map*/