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: '930f76bb8c97c2785871e8d681686d47b9445286', 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: '08dc7e5ebdaa763fc8aeedf1df1dd8cb448e8291', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: 'abd26e9f8c028b7733a3842b3c7f806285cd7b6d' }, this.afDesc), h("g", { key: '409a675ea7e689cc06fa9320b52cd78fe2fece22', class: "digi-icon-x-button__shape", fill: "none", "fill-rule": "evenodd" }, h("circle", { key: 'd985c83e3b0bfa5d8615be563dd6e418201a2ba3', fill: "currentColor", cx: "12.5", cy: "12.5", r: "12.5" }), h("g", { key: '58c0d033a8a5ff9fec725336708e11470cf44c19', stroke: "#F9F9F9", "stroke-linecap": "square", "stroke-width": "2.044" }, h("path", { key: 'a192787aaae9f28f61e143eef336165aa5702a37', 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": {}
        };
    }
}
