import { NgModule, Component, ElementRef, Input } from "@angular/core";
import { getAttributes } from "@carbon/icon-helpers";
var Link20 = /** @class */ (function () {
    function Link20(elementRef) {
        this.elementRef = elementRef;
    }
    Link20.prototype.ngAfterViewInit = function () {
        var svg = this.elementRef.nativeElement.querySelector("svg");
        var attributes = getAttributes({
            width: 20,
            height: 20,
            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;
            Link20.titleIdCounter++;
            title.setAttribute("id", "link20-" + Link20.titleIdCounter);
            svg.appendChild(title);
            svg.setAttribute("aria-labelledby", "link20-" + Link20.titleIdCounter);
        }
    };
    Link20.titleIdCounter = 0;
    Link20.decorators = [
        { type: Component, args: [{
                    selector: "ibm-icon-link20",
                    template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" style=\"will-change: transform;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M29.25 6.76a6 6 0 0 0-8.5 0l1.42 1.42a4 4 0 1 1 5.67 5.67l-8 8a4 4 0 1 1-5.67-5.66l1.41-1.42-1.41-1.42-1.42 1.42a6 6 0 0 0 0 8.5A6 6 0 0 0 17 25a6 6 0 0 0 4.27-1.76l8-8a6 6 0 0 0-.02-8.48z\"></path><path d=\"M4.19 24.82a4 4 0 0 1 0-5.67l8-8a4 4 0 0 1 5.67 0A3.94 3.94 0 0 1 19 14a4 4 0 0 1-1.17 2.85L15.71 19l1.42 1.42 2.12-2.12a6 6 0 0 0-8.51-8.51l-8 8a6 6 0 0 0 0 8.51A6 6 0 0 0 7 28a6.07 6.07 0 0 0 4.28-1.76l-1.42-1.42a4 4 0 0 1-5.67 0z\"></path></svg>"
                },] },
    ];
    /** @nocollapse */
    Link20.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    Link20.propDecorators = {
        ariaLabel: [{ type: Input }],
        ariaLabelledby: [{ type: Input }],
        ariaHidden: [{ type: Input }],
        title: [{ type: Input }],
        focusable: [{ type: Input }]
    };
    return Link20;
}());
export { Link20 };
var Link20Module = /** @class */ (function () {
    function Link20Module() {
    }
    Link20Module.decorators = [
        { type: NgModule, args: [{
                    declarations: [
                        Link20
                    ],
                    exports: [
                        Link20
                    ]
                },] },
    ];
    return Link20Module;
}());
export { Link20Module };
//# sourceMappingURL=20.js.map