import * as tslib_1 from "tslib";
import { create, tsx } from '@dojo/framework/core/vdom';
import theme from '../middleware/theme';
import Card from '../card';
import * as css from '../theme/default/header-card.m.css';
const factory = create({ theme })
    .properties()
    .children();
export const HeaderCard = factory(function HeaderCard({ middleware: { theme }, properties, children }) {
    const themeCss = theme.classes(css);
    const _a = properties(), { title, subtitle } = _a, cardProps = tslib_1.__rest(_a, ["title", "subtitle"]);
    const [_b] = children(), _c = _b === void 0 ? {} : _b, { avatar } = _c, cardChildren = tslib_1.__rest(_c, ["avatar"]);
    return (tsx(Card, Object.assign({ key: "root" }, cardProps), Object.assign({ header: (tsx("div", { key: "header", classes: themeCss.header },
            avatar && tsx("div", { classes: themeCss.avatar }, avatar),
            tsx("div", { key: "headerContent", classes: themeCss.headerContent },
                tsx("h2", { classes: themeCss.title }, title),
                subtitle && tsx("h3", { classes: themeCss.subtitle }, subtitle)))) }, cardChildren)));
});
export default HeaderCard;

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