"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var vdom_1 = require("@dojo/framework/core/vdom");
var theme_1 = require("../middleware/theme");
var card_1 = require("../card");
var css = require("../theme/default/header-card.m.css");
var factory = vdom_1.create({ theme: theme_1.default })
    .properties()
    .children();
exports.HeaderCard = factory(function HeaderCard(_a) {
    var theme = _a.middleware.theme, properties = _a.properties, children = _a.children;
    var themeCss = theme.classes(css);
    var _b = properties(), title = _b.title, subtitle = _b.subtitle, cardProps = tslib_1.__rest(_b, ["title", "subtitle"]);
    var _c = tslib_1.__read(children(), 1), _d = _c[0], _e = _d === void 0 ? {} : _d, avatar = _e.avatar, cardChildren = tslib_1.__rest(_e, ["avatar"]);
    return (vdom_1.tsx(card_1.default, tslib_1.__assign({ key: "root" }, cardProps), tslib_1.__assign({ header: (vdom_1.tsx("div", { key: "header", classes: themeCss.header },
            avatar && vdom_1.tsx("div", { classes: themeCss.avatar }, avatar),
            vdom_1.tsx("div", { key: "headerContent", classes: themeCss.headerContent },
                vdom_1.tsx("h2", { classes: themeCss.title }, title),
                subtitle && vdom_1.tsx("h3", { classes: themeCss.subtitle }, subtitle)))) }, cardChildren)));
});
exports.default = exports.HeaderCard;

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