import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var ModelReference20 = /** @class */ (function () {
    function ModelReference20(elementRef) {
        this.elementRef = elementRef;
    }
    ModelReference20.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 20,
            height: 20,
            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;
            ModelReference20.titleIdCounter++;
            title.setAttribute("id", "model-reference20-" + ModelReference20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "model-reference20-" + ModelReference20.titleIdCounter);
        }
    };
    ModelReference20.titleIdCounter = 0;
    ModelReference20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-model-reference20",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M4 21v2h3.586L2 28.586 3.414 30 9 24.414V28h2v-7H4z\"></path><path d=\"M23.5 4h-15l-6 8-.784 1.045L6.877 19l1.324-1.526L5.19 14h5.112L16 29.527l14.284-16.482zm3.5 8h-5.446l-3.75-6H22.5zm-7.804 0h-6.392L16 6.887zM5 12l4.5-6h4.696l-3.75 6zm10.999 11.721L12.432 14h7.136zm1.944.51L21.698 14h5.112z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    ModelReference20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    ModelReference20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return ModelReference20;
}());
export { ModelReference20 };
var ModelReference20Module = /** @class */ (function () {
    function ModelReference20Module() {
    }
    ModelReference20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        ModelReference20
                    ],
                    exports: [
                        ModelReference20
                    ]
                },] },
    ];
    return ModelReference20Module;
}());
export { ModelReference20Module };
//# sourceMappingURL=20.js.map