import theme from '../middleware/theme';
import { create, tsx } from '@dojo/framework/core/vdom';
import * as css from '../theme/default/snackbar.m.css';
import * as fixedCss from './styles/snackbar.m.css';
const factory = create({ theme })
    .properties()
    .children();
export const Snackbar = factory(function Snackbar({ middleware: { theme }, properties, children }) {
    const { type, open, leading, stacked } = properties();
    const { message, actions } = children()[0];
    const themeCss = theme.classes(css);
    return (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
        ] },
        tsx("div", { key: "content", classes: themeCss.content },
            tsx("div", { key: "label", classes: themeCss.label, role: "status", "aria-live": "polite" }, message),
            actions && (tsx("div", { key: "actions", classes: themeCss.actions }, actions)))));
});
export default Snackbar;

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