"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var css = require("../theme/default/header.m.css");
var theme_1 = require("../middleware/theme");
var vdom_1 = require("@dojo/framework/core/vdom");
var factory = vdom_1.create({ theme: theme_1.default })
    .properties()
    .children();
exports.Header = factory(function Header(_a) {
    var children = _a.children, properties = _a.properties, theme = _a.middleware.theme;
    var classes = theme.classes(css);
    var sticky = properties().sticky;
    var _b = children()[0], actions = _b.actions, leading = _b.leading, title = _b.title, trailing = _b.trailing;
    return (vdom_1.tsx("header", { key: "header", classes: [theme.variant(), sticky ? classes.spacer : undefined] },
        vdom_1.tsx("div", { classes: [classes.root, sticky && classes.sticky], key: "root" },
            vdom_1.tsx("div", { classes: classes.row },
                vdom_1.tsx("div", { classes: classes.primary, key: "primary" },
                    leading && vdom_1.tsx("div", { classes: classes.leading }, leading),
                    vdom_1.tsx("div", { classes: classes.title, key: "title" }, title && title)),
                vdom_1.tsx("div", { classes: classes.secondary, key: "secondary" },
                    vdom_1.tsx("nav", { classes: classes.actions, key: "actions" }, actions &&
                        (Array.isArray(actions) ? actions : [actions]).map(function (action) { return (vdom_1.tsx("div", { classes: classes.action }, action)); })),
                    trailing && vdom_1.tsx("div", { classes: classes.trailing }, trailing))))));
});
exports.default = exports.Header;

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