var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { bindable, containerless, customElement, inlineView } from "aurelia-framework";
export var UIMenuGroup = (function () {
    function UIMenuGroup(element) {
        this.element = element;
        this.label = "";
        this.hiddenLabel = false;
        this.collapsed = false;
    }
    UIMenuGroup.prototype.attached = function () {
        if (this.element.hasAttribute("collapsible")) {
            this.vmElement.classList.add("ui-menu__group--collapsible");
        }
    };
    __decorate([
        bindable(),
        __metadata("design:type", String)
    ], UIMenuGroup.prototype, "label", void 0);
    __decorate([
        bindable,
        __metadata("design:type", Boolean)
    ], UIMenuGroup.prototype, "hiddenLabel", void 0);
    __decorate([
        bindable(),
        __metadata("design:type", Boolean)
    ], UIMenuGroup.prototype, "collapsed", void 0);
    UIMenuGroup = __decorate([
        containerless(),
        customElement("ui-menu-group"),
        inlineView("<template><fieldset class=\"ui-menu__group\" data-collapsed.bind=\"collapsed\" ref=\"vmElement\">\n    <legend class=\"ui-menu__group__label\" if.bind=\"!hiddenLabel\" innerhtml.bind=\"label\" click.trigger=\"collapsed = !collapsed\"></legend>\n    <div class=\"ui-menu__group__container\"><slot></slot></div>\n  </fieldset></template>"),
        __metadata("design:paramtypes", [Element])
    ], UIMenuGroup);
    return UIMenuGroup;
}());

//# sourceMappingURL=ui-menu-group.js.map
