"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var vdom_1 = require("@dojo/framework/core/vdom");
var theme_1 = require("../middleware/theme");
var css = require("../theme/default/avatar.m.css");
var factory = vdom_1.create({ theme: theme_1.default }).properties();
exports.Avatar = factory(function Avatar(_a) {
    var theme = _a.middleware.theme, properties = _a.properties, children = _a.children;
    var themeCss = theme.classes(css);
    var _b = properties(), secondary = _b.secondary, outline = _b.outline, src = _b.src, alt = _b.alt, _c = _b.type, type = _c === void 0 ? 'circle' : _c, _d = _b.size, size = _d === void 0 ? 'medium' : _d;
    return (vdom_1.tsx("div", { key: "root", role: src && 'image', "aria-label": alt, classes: [
            theme.variant(),
            themeCss.root,
            secondary ? themeCss.avatarColorSecondary : themeCss.avatarColor,
            outline && themeCss.avatarOutline,
            themeCss[size],
            themeCss[type]
        ], styles: src
            ? {
                backgroundImage: "url(" + src + ")"
            }
            : {} }, children()));
});
exports.default = exports.Avatar;

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