import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Pin32 = /** @class */ (function () {
    function Pin32(elementRef) {
        this.elementRef = elementRef;
    }
    Pin32.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;
            Pin32.titleIdCounter++;
            title.setAttribute("id", "pin32-" + Pin32.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "pin32-" + Pin32.titleIdCounter);
        }
    };
    Pin32.titleIdCounter = 0;
    Pin32.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-pin32",
                    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=\"M28.59 13.31L30 11.9 20 2l-1.31 1.42 1.18 1.18-11.49 9.72-1.72-1.71L5.25 14l5.66 5.68L2 28.58 3.41 30l8.91-8.91L18 26.75l1.39-1.42-1.71-1.71 9.72-11.49zM16.26 22.2L9.8 15.74 21.29 6 26 10.71z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Pin32.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Pin32.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Pin32;
}());
export { Pin32 };
var Pin32Module = /** @class */ (function () {
    function Pin32Module() {
    }
    Pin32Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Pin32
                    ],
                    exports: [
                        Pin32
                    ]
                },] },
    ];
    return Pin32Module;
}());
export { Pin32Module };
//# sourceMappingURL=32.js.map