"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var vdom_1 = require("@dojo/framework/core/vdom");
var baseCss = require("../common/styles/base.m.css");
var theme_1 = require("../middleware/theme");
var css = require("../theme/default/label.m.css");
var util_1 = require("../common/util");
var factory = vdom_1.create({ theme: theme_1.default }).properties();
exports.Label = factory(function Label(_a) {
    var properties = _a.properties, id = _a.id, children = _a.children, theme = _a.middleware.theme;
    var _b = properties(), _c = _b.aria, aria = _c === void 0 ? {} : _c, active = _b.active, disabled = _b.disabled, focused = _b.focused, forId = _b.forId, hidden = _b.hidden, readOnly = _b.readOnly, required = _b.required, secondary = _b.secondary, valid = _b.valid, _d = _b.widgetId, widgetId = _d === void 0 ? "label-" + id : _d;
    var themeCss = theme.classes(css);
    return (vdom_1.tsx("label", tslib_1.__assign({}, util_1.formatAriaProperties(aria), { id: widgetId, classes: [
            theme.variant(),
            themeCss.root,
            disabled ? themeCss.disabled : null,
            focused ? themeCss.focused : null,
            valid === true ? themeCss.valid : null,
            valid === false ? themeCss.invalid : null,
            readOnly ? themeCss.readonly : null,
            required ? themeCss.required : null,
            secondary ? themeCss.secondary : null,
            active ? themeCss.active : null,
            hidden ? baseCss.visuallyHidden : null
        ], for: forId }), children()));
});
exports.default = exports.Label;

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