import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Attachment16 = /** @class */ (function () {
    function Attachment16(elementRef) {
        this.elementRef = elementRef;
    }
    Attachment16.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 16,
            height: 16,
            viewBox: "0 0 16 16",
            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;
            Attachment16.titleIdCounter++;
            title.setAttribute("id", "attachment16-" + Attachment16.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "attachment16-" + Attachment16.titleIdCounter);
        }
    };
    Attachment16.titleIdCounter = 0;
    Attachment16.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-attachment16",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M14.1 9L7 1.9C5.6.6 3.3.7 2 2.1S.7 5.6 1.9 7l1.6 1.6.8-.8-1.6-1.6c-1-.9-1-2.5-.1-3.5s2.5-1 3.5-.1l.1.1 7.1 7.1c1 .9 1 2.5.1 3.5s-2.5 1-3.5.1l-.1-.1-3.3-3.4c-.6-.5-.6-1.4 0-1.9s1.4-.5 1.9 0l1.7 1.7.8-.7-1.8-1.8c-1-.9-2.5-.9-3.5.1-.9.9-.9 2.4 0 3.3L9 14.1c1.4 1.3 3.7 1.2 5-.2s1.3-3.5.1-4.9z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Attachment16.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Attachment16.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Attachment16;
}());
export { Attachment16 };
var Attachment16Module = /** @class */ (function () {
    function Attachment16Module() {
    }
    Attachment16Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Attachment16
                    ],
                    exports: [
                        Attachment16
                    ]
                },] },
    ];
    return Attachment16Module;
}());
export { Attachment16Module };
//# sourceMappingURL=16.js.map