import { h } from "@stencil/core";
import { TypographyHeadingJumboLevel } from "./typography-heading-jumbo-level.enum";
import { TypographyHeadingJumboVariation } from "./typography-heading-jumbo-variation.enum";
/**
 * @enums TypographyHeadingJumboLevel - typography-heading-jumbo-level.enum.ts
 * @enums TypographyHeadingJumboVariant - typography-heading-jumbo-variant.enum.ts
 * @swedishName Jumborubrik
 */
export class TypographyHeadingJumbo {
    constructor() {
        this.afText = '';
        this.afVariation = undefined;
        this.afLevel = TypographyHeadingJumboLevel.H1;
        this.afLang = 'sv';
    }
    /**
     * Lyssnar på om fokus sätts på custom-elementet och propagerar ner det till själva rubrik-elementet.
     * @en Listens for when focus is set on the custom element and propagates it down to the actual heading element.
     */
    focusOnHeading() {
        this.headingElement.focus();
    }
    get cssModifiers() {
        return {
            'digi-typography-heading-jumbo--primary': this.afVariation === TypographyHeadingJumboVariation.PRIMARY,
            'digi-typography-heading-jumbo--secondary': this.afVariation === TypographyHeadingJumboVariation.SECONDARY
        };
    }
    render() {
        return (h(this.afLevel, { key: '77209e0a97d6bc0be66df81e1be66e8b9abcf4ca', ref: (el) => (this.headingElement = el), class: Object.assign({ 'digi-typography-heading-jumbo': true }, this.cssModifiers), lang: this.afLang, tabindex: -1 }, this.afText));
    }
    static get is() { return "digi-typography-heading-jumbo"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["typography-heading-jumbo.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["typography-heading-jumbo.css"]
        };
    }
    static get properties() {
        return {
            "afText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "The heading text"
                        }],
                    "text": "Rubrikens text"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-text",
                "reflect": false,
                "defaultValue": "''"
            },
            "afVariation": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "TypographyHeadingJumboVariation",
                    "resolved": "TypographyHeadingJumboVariation.PRIMARY | TypographyHeadingJumboVariation.SECONDARY",
                    "references": {
                        "TypographyHeadingJumboVariation": {
                            "location": "import",
                            "path": "./typography-heading-jumbo-variation.enum",
                            "id": "src/components/_typography/typography-heading-jumbo/typography-heading-jumbo-variation.enum.ts::TypographyHeadingJumboVariation"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Variant"
                        }],
                    "text": "Variant"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-variation",
                "reflect": false
            },
            "afLevel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "TypographyHeadingJumboLevel",
                    "resolved": "TypographyHeadingJumboLevel.H1 | TypographyHeadingJumboLevel.H2 | TypographyHeadingJumboLevel.H3 | TypographyHeadingJumboLevel.H4 | TypographyHeadingJumboLevel.H5 | TypographyHeadingJumboLevel.H6",
                    "references": {
                        "TypographyHeadingJumboLevel": {
                            "location": "import",
                            "path": "./typography-heading-jumbo-level.enum",
                            "id": "src/components/_typography/typography-heading-jumbo/typography-heading-jumbo-level.enum.ts::TypographyHeadingJumboLevel"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set heading level. Default is 'h1'"
                        }],
                    "text": "S\u00E4tt rubrikens vikt. 'h1' \u00E4r f\u00F6rvalt."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-level",
                "reflect": false,
                "defaultValue": "TypographyHeadingJumboLevel.H1"
            },
            "afLang": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set language inside of title element. Defaults to 'sv' (swedish)."
                        }],
                    "text": "S\u00E4tt spr\u00E5k inuti rubrik-elementet. 'sv' (svenska) \u00E4r f\u00F6rvalt."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-lang",
                "reflect": false,
                "defaultValue": "'sv'"
            }
        };
    }
    static get listeners() {
        return [{
                "name": "focus",
                "method": "focusOnHeading",
                "target": undefined,
                "capture": false,
                "passive": false
            }];
    }
}
