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, customElement, inlineView } from "aurelia-templating";
export var UIAccordeon = (function () {
    function UIAccordeon() {
        this.displayMode = 'Vertical';
    }
    UIAccordeon.prototype.attached = function () {
        if (this.displayMode == "Horizontal") {
            var items = this.currentAccordeon.getElementsByTagName('ui-accordeon-item');
            if (items.length > 0) {
                if (Array.from(items).filter(function (x) { return x.au['ui-accordeon-item'].viewModel.expanded; }).length == 0) {
                    items[0].au['ui-accordeon-item'].viewModel.expanded = true;
                }
            }
        }
    };
    __decorate([
        bindable,
        __metadata("design:type", String)
    ], UIAccordeon.prototype, "displayMode", void 0);
    UIAccordeon = __decorate([
        inlineView("<template class=\"ui-accordeon\" class.bind=\"(displayMode == 'Vertical' ? 'ui-accordeon-vertical' : 'ui-accordeon-horizontal')\" ref=\"currentAccordeon\">\n<slot></slot>\n</template>"),
        customElement("ui-accordeon")
    ], UIAccordeon);
    return UIAccordeon;
}());

//# sourceMappingURL=ui-accordeon.js.map
