import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Scalpel24 = /** @class */ (function () {
    function Scalpel24(elementRef) {
        this.elementRef = elementRef;
    }
    Scalpel24.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;
            Scalpel24.titleIdCounter++;
            title.setAttribute("id", "scalpel24-" + Scalpel24.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "scalpel24-" + Scalpel24.titleIdCounter);
        }
    };
    Scalpel24.titleIdCounter = 0;
    Scalpel24.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-scalpel24",
                    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.83 5.17a4.1 4.1 0 0 0-5.66 0L.34 28h9.25a5 5 0 0 0 3.53-1.46l15.71-15.71a4 4 0 0 0 0-5.66zM12.29 18.88l2.09-2.09 2.83 2.83-2.09 2.09zm-.58 6.24a3 3 0 0 1-2.12.88H5.17l5.71-5.71 2.83 2.83zm15.7-15.71l-8.79 8.8-2.83-2.83 8.8-8.79a2 2 0 0 1 2.82 0 2 2 0 0 1 0 2.82z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Scalpel24.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Scalpel24.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Scalpel24;
}());
export { Scalpel24 };
var Scalpel24Module = /** @class */ (function () {
    function Scalpel24Module() {
    }
    Scalpel24Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Scalpel24
                    ],
                    exports: [
                        Scalpel24
                    ]
                },] },
    ];
    return Scalpel24Module;
}());
export { Scalpel24Module };
//# sourceMappingURL=24.js.map