import { h } from "@stencil/core";
import { randomIdGenerator } from "../../../global/utils/randomIdGenerator";
export class IconXButton {
    constructor() {
        this.afTitle = undefined;
        this.afDesc = undefined;
        this.afSvgAriaHidden = true;
        this.afSvgAriaLabelledby = undefined;
        this.titleId = randomIdGenerator('icontitle');
    }
    render() {
        return (h("svg", { key: '486369279ab8709bfdb51d4cffd3660f1b07052a', class: "digi-icon-x-button", width: "25", height: "25", viewBox: "0 0 25 25", "aria-hidden": this.afSvgAriaHidden ? 'true' : 'false', "aria-labelledby": this.afSvgAriaLabelledby
                ? this.afSvgAriaLabelledby
                : this.afTitle
                    ? this.titleId
                    : undefined, xmlns: "http://www.w3.org/2000/svg" }, this.afTitle && h("title", { key: '008c15b90f6f3c0a043c3b6512d926e3f35b5b66', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: '0c82286332b9175b4583e151520d460af6c0d8a6' }, this.afDesc), h("g", { key: '8d4eb88be4dd4d73be7fc5a38ba8fcea1509c569', class: "digi-icon-x-button__shape", fill: "none", "fill-rule": "evenodd" }, h("circle", { key: '6a6637ec5815fa12611e2d35cc9c8d2707b0130c', fill: "currentColor", cx: "12.5", cy: "12.5", r: "12.5" }), h("g", { key: '4f74bfa47aa4b46e6499c67e90628520f77a2273', stroke: "#F9F9F9", "stroke-linecap": "square", "stroke-width": "2.044" }, h("path", { key: '0c8e6e91fa83c665a01670920f6c60a6b5973891', d: "M8.333 8.333l8.32 8.32M16.652 8.333l-8.319 8.32" })))));
    }
    static get is() { return "digi-icon-x-button"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["icon-x-button.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["icon-x-button.css"]
        };
    }
    static get properties() {
        return {
            "afTitle": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Adds a title element inside the svg"
                        }],
                    "text": "L\u00E4gger till ett titleelement i svg:n"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-title",
                "reflect": false
            },
            "afDesc": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Adds a desc element inside the svg"
                        }],
                    "text": "L\u00E4gger till ett descelement i svg:n"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-desc",
                "reflect": false
            },
            "afSvgAriaHidden": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Hides the icon for screen readers. Default is set to true."
                        }],
                    "text": "F\u00F6r att d\u00F6lja ikonen f\u00F6r sk\u00E4rml\u00E4sare. Default \u00E4r satt till true."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-svg-aria-hidden",
                "reflect": false,
                "defaultValue": "true"
            },
            "afSvgAriaLabelledby": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Reference other elements on the page to define an accessible name."
                        }],
                    "text": "Referera till andra element p\u00E5 sidan f\u00F6r att definiera ett tillg\u00E4ngligt namn."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-svg-aria-labelledby",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "titleId": {}
        };
    }
}
