import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var TreeView32 = /** @class */ (function () {
    function TreeView32(elementRef) {
        this.elementRef = elementRef;
    }
    TreeView32.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 32,
            height: 32,
            viewBox: "0 0 32 32",
            title: this.title,
            "aria-label": this.ariaLabel,
            "aria-labelledby": this.ariaLabelledby,
            "aria-hidden": this.ariaHidden,
            focusable: this.focusable
        });
        var attrKeys = Object.keys(attributes);
        for (var i = 0; i < attrKeys.length; i++) {
            var key = attrKeys[i];
            var value = attributes[key];
            if (key === "title") {
                continue;
            }
            if (value) {
                svg.setAttribute(key, value);
            }
        }
        if (attributes.title) {
            var title = document.createElement("title");
            title.textContent = attributes.title;
            TreeView32.titleIdCounter++;
            title.setAttribute("id", "tree-view32-" + TreeView32.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "tree-view32-" + TreeView32.titleIdCounter);
        }
    };
    TreeView32.titleIdCounter = 0;
    TreeView32.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-tree-view32",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M30 20v-8h-8v3h-5V7a2 2 0 0 0-2-2h-5V2H2v8h8V7h5v18a2 2 0 0 0 2 2h5v3h8v-8h-8v3h-5v-8h5v3zM8 8H4V4h4zm16 16h4v4h-4zm0-10h4v4h-4z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    TreeView32.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    TreeView32.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return TreeView32;
}());
export { TreeView32 };
var TreeView32Module = /** @class */ (function () {
    function TreeView32Module() {
    }
    TreeView32Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        TreeView32
                    ],
                    exports: [
                        TreeView32
                    ]
                },] },
    ];
    return TreeView32Module;
}());
export { TreeView32Module };
//# sourceMappingURL=32.js.map