import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var ChevronUpGlyph = /** @class */ (function () {
    function ChevronUpGlyph(elementRef) {
        this.elementRef = elementRef;
    }
    ChevronUpGlyph.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 10,
            height: 6,
            viewBox: "0 0 10 6",
            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;
            ChevronUpGlyph.titleIdCounter++;
            title.setAttribute("id", "chevron-up-glyph-" + ChevronUpGlyph.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "chevron-up-glyph-" + ChevronUpGlyph.titleIdCounter);
        }
    };
    ChevronUpGlyph.titleIdCounter = 0;
    ChevronUpGlyph.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-chevron-up-glyph",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"6\" viewBox=\"0 0 10 6\" aria-hidden=\"true\"><path d=\"M5 0l5 5-.7.7L5 1.4.7 5.7 0 5z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    ChevronUpGlyph.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    ChevronUpGlyph.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return ChevronUpGlyph;
}());
export { ChevronUpGlyph };
var ChevronUpGlyphModule = /** @class */ (function () {
    function ChevronUpGlyphModule() {
    }
    ChevronUpGlyphModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        ChevronUpGlyph
                    ],
                    exports: [
                        ChevronUpGlyph
                    ]
                },] },
    ];
    return ChevronUpGlyphModule;
}());
export { ChevronUpGlyphModule };
//# sourceMappingURL=index.js.map