import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Pin24 = /** @class */ (function () {
    function Pin24(elementRef) {
        this.elementRef = elementRef;
    }
    Pin24.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 24,
            height: 24,
            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;
            Pin24.titleIdCounter++;
            title.setAttribute("id", "pin24-" + Pin24.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "pin24-" + Pin24.titleIdCounter);
        }
    };
    Pin24.titleIdCounter = 0;
    Pin24.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-pin24",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" 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 */
    Pin24.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Pin24.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Pin24;
}());
export { Pin24 };
var Pin24Module = /** @class */ (function () {
    function Pin24Module() {
    }
    Pin24Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Pin24
                    ],
                    exports: [
                        Pin24
                    ]
                },] },
    ];
    return Pin24Module;
}());
export { Pin24Module };
//# sourceMappingURL=24.js.map