/* eslint-disable max-len */
import { h } from "@stencil/core";
import { LayoutBlockVariation } from "../../../components/_layout/layout-block/layout-block-variation.enum";
import { logger } from "../../../global/utils/logger";
import { randomIdGenerator } from "../../../global/utils/randomIdGenerator";
import { FeedbackRatingVariation } from "./tools-feedback-rating-variation.enum";
import { FeedbackRatingType } from "./tools-feedback-rating-type.enum";
import { FeedbackRatingHeadingLevel } from "./tools-feedback-rating-heading-level.enum";
/**
 *
 * @enums FeedbackRatingVariation - tools-feedback-rating-variation.enum
 * @enums FeedbackRatingType - tools-feedback-rating-type.enum
 * @enums FeedbackRatingHeadingLevel - tools-feedback-rating-heading-level.enum
 *
 * @swedishName Betygskomponenten
 */
export class ToolsFeedbackRating {
    constructor() {
        this.afId = randomIdGenerator('digi-tools-feedback-rating');
        this.afIsDone = undefined;
        this.afVariation = undefined;
        this.afType = FeedbackRatingType.FULLWIDTH;
        this.afHeadingLevel = FeedbackRatingHeadingLevel.H2;
        this.afQuestion = 'Hur nöjd är du med tjänsten?';
        this.afThankYouHeading = 'Tack för din feedback!';
        this.afRatings = 'Inte alls nöjd;Inte särskilt nöjd;Ganska nöjd;Nöjd;Mycket nöjd';
        this.afDir = undefined;
        this.afLang = undefined;
        this.afLink = undefined;
        this.afLinkText = undefined;
        this.afProduct = undefined;
        this.afApplication = undefined;
        this.afProductArea = undefined;
        this.afName = undefined;
        this.afQuestionType = undefined;
        this.afUseCustomLink = false;
        this.currentStep = 1;
        this.validContent = true;
        this.hoveredRating = undefined;
        this.selectedRating = undefined;
        this.selectedText = undefined;
    }
    afIsDoneHandler() {
        this.currentStep = 2;
    }
    validateQuestion() {
        if (this.afQuestion == '') {
            logger.warn(`digi-tools-feedback-rating must have a question - please add af-question to the component`, this.hostElement);
            this.validContent = false;
            return false;
        }
    }
    componentWillLoad() {
        this.validateQuestion();
    }
    componentDidRender() {
        if (this._thankYouHeading) {
            this._thankYouHeading.focus();
        }
    }
    getCurrentPageUrl() {
        return window.location.href;
    }
    renderLink() {
        if (this.afUseCustomLink) {
            return `${this.afLink}?q1o${this.selectedRating}=1&q2o1=${this.getCurrentPageUrl()}`;
        }
        else {
            return this.afLink;
        }
    }
    /**
     * Används för att ändra steg mellan 1-2.
     * @en Use to change step between 1-2
     * @ignore
     */
    async afMSetStep(step) {
        this.currentStep = step;
    }
    /**
     * Används för att ändra till steg 1 och återställa betyget.
     * @en Use to change to step 1 and reset star rating
     */
    async afMReset() {
        this.afMSetStep(1);
        this.selectedRating = null;
    }
    submitFeedback() {
        this.afOnClickFeedback.emit(this.getFeedbackData());
    }
    submitFeedbackLink() {
        this.afOnSubmitFeedbackLink.emit(this.getFeedbackLinkData());
    }
    ratingsData() {
        let ratings = [];
        if (this.afRatings) {
            ratings = this.afRatings.split(';');
        }
        const ratingItems = [];
        for (let i = 0; i < 5; i++) {
            ratingItems.push({
                value: i + 1,
                text: ratings[i] || ''
            });
        }
        return ratingItems;
    }
    handleRatingChange(rating) {
        this.selectedRating = rating;
        this.selectedText =
            (this.ratingsData().find((item) => item.value === this.selectedRating) ||
                {}).text || null;
        this.submitFeedback();
        this.currentStep = 2;
    }
    handleHover(rating) {
        this.hoveredRating = rating;
    }
    getFeedbackData() {
        return {
            productarea: this.afProductArea,
            product: this.afProduct,
            application: this.afApplication,
            id: this.afId,
            name: this.afName,
            questionType: this.afQuestionType,
            question: this.afQuestion,
            rating: this.selectedRating,
            ratingDescription: this.selectedText,
            variation: this.afVariation,
            version: '2'
        };
    }
    getFeedbackLinkData() {
        return {
            productarea: this.afProductArea,
            product: this.afProduct,
            application: this.afApplication,
            id: this.afId,
            name: this.afName,
            questionType: this.afQuestionType,
            question: this.afQuestion,
            linkText: this.afLinkText,
            linkHref: this.afLink,
            version: '2'
        };
    }
    get cssModifiers() {
        return {
            'digi-tools-feedback-rating--fullwidth': this.afType === FeedbackRatingType.FULLWIDTH,
            'digi-tools-feedback-rating--grid': this.afType === FeedbackRatingType.GRID,
            'digi-tools-feedback-rating--minimal': this.afType === FeedbackRatingType.MINIMAL
        };
    }
    get layoutBlockVariation() {
        if (this.afType === FeedbackRatingType.MINIMAL)
            return LayoutBlockVariation.TRANSPARENT;
        switch (this.afVariation) {
            case FeedbackRatingVariation.PRIMARY:
                return LayoutBlockVariation.SYMBOL;
            case FeedbackRatingVariation.SECONDARY:
                return LayoutBlockVariation.PRIMARY;
            case FeedbackRatingVariation.TERTIARY:
                return LayoutBlockVariation.SECONDARY;
        }
    }
    get content() {
        return (h("digi-typography", null, this.validContent && (h("div", { dir: this.afDir, lang: this.afLang, class: `digi-tools-feedback-rating__wrapper ${this.currentStep === 2 ? 'step2' : ''}` }, this.currentStep === 1 && (h("div", { class: "digi-tools-feedback-rating__star-rating" }, h(this.afHeadingLevel, { id: `${this.afId}-rating-question`, class: `digi-tools-feedback-rating__heading ${this.afType === FeedbackRatingType.MINIMAL ? 'hidden' : ''}` }, this.afQuestion), h("div", { class: "digi-tools-feedback-rating__step1-wrapper" }, this.afRatings && (h("span", { class: "digi-tools-feedback-rating__step1-description" }, "V\u00E4lj fr\u00E5n", ' ', `${(this.ratingsData().find((item) => item.value === 1) ||
            {}).text.toLowerCase() || null} till ${(this.ratingsData().find((item) => item.value === 5) ||
            {}).text.toLowerCase() || null}`)), h("div", { "aria-labelledby": `${this.afId}-rating-question`, class: "digi-tools-feedback-rating__star-rating-stars", role: "group" }, this.ratingsData().map(({ text, value }) => (h("div", { class: "digi-tools-feedback-rating__star-rating-star" }, h("button", { class: "digi-tools-feedback-rating__star-rating-star-button", onClick: () => this.handleRatingChange(value), "aria-label": `${value} ${value === 1 ? 'stjärna' : 'stjärnor'}${text !== '' ? ', ' + text : ''}`, onMouseEnter: () => this.handleHover(value), onMouseLeave: () => this.handleHover(0), onFocus: () => this.handleHover(value), onFocusout: () => this.handleHover(0) }, h("svg", { "aria-hidden": "true", width: "29px", height: "29px", viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg", class: `digi-tools-feedback-rating-star-icon ${this.hoveredRating >= value ? 'filled' : ''}` }, h("g", { stroke: "none", "stroke-width": "1", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("g", { transform: "translate(-1852, -2564)", "stroke-width": "2", class: "digi-tools-feedback-rating-star-icon-border" }, h("g", { transform: "translate(1663, 2565)" }, h("g", { transform: "translate(190, 0)" }, h("path", { d: "M13.0369701,1.00988613 L9.47212213,8.51643297 L1.4958694,9.72422429 C0.0655277509,9.93973122 -0.507709524,11.7709448 0.529620648,12.8199039 L6.30005635,18.6595463 L4.93529305,26.9090563 C4.6897182,28.3999832 6.20191813,29.5170473 7.46854321,28.8195669 L14.6037422,24.9244875 L21.7391705,28.8195669 C23.0057956,29.5113322 24.5179955,28.3999832 24.2721914,26.9090563 L22.9074281,18.6595463 L28.6780931,12.8199039 C29.715194,11.7709448 29.1419567,9.93973122 27.711615,9.72422429 L19.7355916,8.51643297 L16.1707436,1.00988613 C15.531928,-0.328161856 13.6810595,-0.345069029 13.0369701,1.00988613 L13.0369701,1.00988613 Z" })))))))))))))), this.currentStep === 2 && (h("div", { class: "digi-tools-feedback-rating__thankyou" }, h("div", { class: "digi-tools-feedback-rating__thankyou-text" }, h("svg", { width: "32", height: "26", xmlns: "http://www.w3.org/2000/svg", class: "digi-tools-feedback-rating__thankyou-check-icon" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { d: "M12.431 25.438C5.577 25.438 0 19.848 0 12.978 0 6.107 5.577.518 12.43.518c2.874 0 5.677 1.006 7.893 2.833l-1.441 1.755a10.163 10.163 0 0 0-6.452-2.315c-5.604 0-10.163 4.57-10.163 10.187 0 5.616 4.56 10.186 10.163 10.186 4.346 0 8.21-2.766 9.617-6.883l2.146.737a12.435 12.435 0 0 1-11.763 8.42", fill: "#333" }), h("path", { d: "M13.073 20.935a.725.725 0 0 1-1.022 0l-8.042-8.013a.72.72 0 0 1 0-1.019l1.704-1.699a.725.725 0 0 1 1.023 0l5.826 5.805L28.417.211a.724.724 0 0 1 1.023 0l1.704 1.699a.72.72 0 0 1 0 1.02l-18.07 18.005Z", fill: "none", class: "digi-tools-feedback-rating__infographic-primary" }))), h("h2", { class: "digi-tools-feedback-rating__thankyou-text", tabindex: "-1", ref: (el) => (this._thankYouHeading = el) }, this.afThankYouHeading)), this.afRatings && (h("p", { class: "digi-tools-feedback-rating__thankyou-text-with-rating" }, "Du har gett betyget \"", this.selectedText.toLowerCase(), "\" med", ' ', this.selectedRating, `${this.selectedRating === 1 ? ' stjärna' : ' stjärnor'}`, ".")))), this.currentStep === 2 && this.afLinkText && (h("div", { class: "digi-tools-feedback-rating__link" }, h("digi-link-external", { afHref: this.renderLink(), "af-target": "_blank", onAfOnClick: () => this.submitFeedbackLink(), "af-variation": "small" }, this.afLinkText)))))));
    }
    render() {
        return (h("div", { key: '4ddfd9efaa8f9981d35d30ba4c00d46c3c0e70b5', class: Object.assign({ 'digi-tools-feedback-rating': true }, this.cssModifiers) }, h("digi-layout-block", { key: '6069b2caffded6690f66e2928baaa547b5fa9c3a', afVariation: this.layoutBlockVariation, afMarginTop: true, "af-container": "none" }, this.content)));
    }
    static get is() { return "digi-tools-feedback-rating"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["tools-feedback-rating.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["tools-feedback-rating.css"]
        };
    }
    static get properties() {
        return {
            "afId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets an id attribute."
                        }],
                    "text": "S\u00E4tter ett id-attribut. Om inget anges anv\u00E4nds en slumpm\u00E4ssig str\u00E4ng."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-id",
                "reflect": false,
                "defaultValue": "randomIdGenerator('digi-tools-feedback-rating')"
            },
            "afIsDone": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "If true, a response message  will show thanking the user for sharing that the page was helpful"
                        }],
                    "text": "G\u00F6r det m\u00F6jligt att visa ett tack-meddelande som visas n\u00E4r anv\u00E4ndaren har delat med sig av feedback."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-is-done",
                "reflect": false
            },
            "afVariation": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "FeedbackRatingVariation",
                    "resolved": "FeedbackRatingVariation.PRIMARY | FeedbackRatingVariation.SECONDARY | FeedbackRatingVariation.TERTIARY",
                    "references": {
                        "FeedbackRatingVariation": {
                            "location": "import",
                            "path": "./tools-feedback-rating-variation.enum",
                            "id": "src/components/_tools/tools-feedback-rating/tools-feedback-rating-variation.enum.ts::FeedbackRatingVariation"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets variation. Can be 'primary', 'secondary' or 'tertiary'"
                        }],
                    "text": "S\u00E4tter variant, kan vara prim\u00E4r, sekund\u00E4r eller terti\u00E4r"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-variation",
                "reflect": false
            },
            "afType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "FeedbackRatingType",
                    "resolved": "FeedbackRatingType.FULLWIDTH | FeedbackRatingType.GRID | FeedbackRatingType.MINIMAL",
                    "references": {
                        "FeedbackRatingType": {
                            "location": "import",
                            "path": "./tools-feedback-rating-type.enum",
                            "id": "src/components/_tools/tools-feedback-rating/tools-feedback-rating-type.enum.ts::FeedbackRatingType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets type. Can be 'fullwidth', 'grid' or 'minimal'."
                        }],
                    "text": "S\u00E4tter typ som kan vara 'fullwidth', 'grid' eller 'minimal'."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-type",
                "reflect": false,
                "defaultValue": "FeedbackRatingType.FULLWIDTH"
            },
            "afHeadingLevel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "FeedbackRatingHeadingLevel",
                    "resolved": "FeedbackRatingHeadingLevel.H1 | FeedbackRatingHeadingLevel.H2 | FeedbackRatingHeadingLevel.H3 | FeedbackRatingHeadingLevel.H4 | FeedbackRatingHeadingLevel.H5 | FeedbackRatingHeadingLevel.H6",
                    "references": {
                        "FeedbackRatingHeadingLevel": {
                            "location": "import",
                            "path": "./tools-feedback-rating-heading-level.enum",
                            "id": "src/components/_tools/tools-feedback-rating/tools-feedback-rating-heading-level.enum.ts::FeedbackRatingHeadingLevel"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set heading level. Default is 'h2'"
                        }],
                    "text": "S\u00E4tt rubrikens vikt. 'h2' \u00E4r f\u00F6rvalt."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-heading-level",
                "reflect": false,
                "defaultValue": "FeedbackRatingHeadingLevel.H2"
            },
            "afQuestion": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets the question"
                        }],
                    "text": "Anger fr\u00E5gan p\u00E5 det som ska betygs\u00E4ttas."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-question",
                "reflect": false,
                "defaultValue": "'Hur n\u00F6jd \u00E4r du med tj\u00E4nsten?'"
            },
            "afThankYouHeading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets the heading after the rating is sent"
                        }],
                    "text": "Anger rubriken efter inskickat betyg."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-thank-you-heading",
                "reflect": false,
                "defaultValue": "'Tack f\u00F6r din feedback!'"
            },
            "afRatings": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets the answer options"
                        }],
                    "text": "Anger svarsalternativen som visas i komponenten och sp\u00E5ras med Piwik. Beh\u00F6ver separeras med semikolon."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-ratings",
                "reflect": false,
                "defaultValue": "'Inte alls n\u00F6jd;Inte s\u00E4rskilt n\u00F6jd;Ganska n\u00F6jd;N\u00F6jd;Mycket n\u00F6jd'"
            },
            "afDir": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set button `dir` attribute."
                        }],
                    "text": "S\u00E4tter attributet 'dir'."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-dir",
                "reflect": false
            },
            "afLang": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set button `dir` attribute."
                        }],
                    "text": "S\u00E4tter attributet 'lang'."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-lang",
                "reflect": false
            },
            "afLink": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets optional hyperlink"
                        }],
                    "text": "Frivillig hyperl\u00E4nk"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-link",
                "reflect": false
            },
            "afLinkText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets hyperlink text"
                        }],
                    "text": "S\u00E4tter hyperl\u00E4nktext"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-link-text",
                "reflect": false
            },
            "afProduct": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets a product name, usable for tracking"
                        }],
                    "text": "S\u00E4tter produktnamn, anv\u00E4ndbart tex vid sp\u00E5rning"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-product",
                "reflect": false
            },
            "afApplication": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets an application name, usable for tracking"
                        }],
                    "text": "S\u00E4tter applikationsnamn, anv\u00E4ndbart tex vid sp\u00E5rning"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-application",
                "reflect": false
            },
            "afProductArea": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets an application name, usable for tracking"
                        }],
                    "text": "S\u00E4tter produktomr\u00E5desnamn, anv\u00E4ndbart tex vid sp\u00E5rning"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-product-area",
                "reflect": false
            },
            "afName": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Sets an application name, usable for tracking"
                        }],
                    "text": "S\u00E4tter beskrivning f\u00F6r m\u00E5lgrupp, sk\u00E4rning, videonamn (t.ex. Blivit f\u00F6r\u00E4ldraledig, F\u00E5tt arbete, B\u00F6rjat studera), anv\u00E4ndbart tex vid sp\u00E5rning"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-name",
                "reflect": false
            },
            "afQuestionType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Defines type of question"
                        }],
                    "text": "Definierar typ av fr\u00E5ga s\u00E5som Inneh\u00E5ll, M\u00E5luppfyllnad eller Kundn\u00F6jdhet f\u00F6r korrekt redovisning i webbanalysverktyg, anv\u00E4ndbart tex vid sp\u00E5rning"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-question-type",
                "reflect": false
            },
            "afUseCustomLink": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Adds custom link for sending rating to Webropol"
                        }],
                    "text": "Om afLink anv\u00E4nds, kombineras den med URL-variabler f\u00F6r inkludering av betyg och URL:en som anv\u00E4ndaren kommer ifr\u00E5n"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-use-custom-link",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
    static get states() {
        return {
            "currentStep": {},
            "validContent": {},
            "hoveredRating": {},
            "selectedRating": {},
            "selectedText": {}
        };
    }
    static get events() {
        return [{
                "method": "afOnClickFeedback",
                "name": "afOnClickFeedback",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "When click on star"
                        }],
                    "text": "Emit av eventet sker vid klick p\u00E5 stj\u00E4rna"
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }, {
                "method": "afOnSubmitFeedbackLink",
                "name": "afOnSubmitFeedbackLink",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "When click on hyperlink"
                        }],
                    "text": "Emit av eventet sker vid klick p\u00E5 l\u00E4nk"
                },
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                }
            }];
    }
    static get methods() {
        return {
            "afMSetStep": {
                "complexType": {
                    "signature": "(step: 1 | 2) => Promise<void>",
                    "parameters": [{
                            "name": "step",
                            "type": "1 | 2",
                            "docs": ""
                        }],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Anv\u00E4nds f\u00F6r att \u00E4ndra steg mellan 1-2.",
                    "tags": [{
                            "name": "en",
                            "text": "Use to change step between 1-2"
                        }, {
                            "name": "ignore",
                            "text": undefined
                        }]
                }
            },
            "afMReset": {
                "complexType": {
                    "signature": "() => Promise<void>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Anv\u00E4nds f\u00F6r att \u00E4ndra till steg 1 och \u00E5terst\u00E4lla betyget.",
                    "tags": [{
                            "name": "en",
                            "text": "Use to change to step 1 and reset star rating"
                        }]
                }
            }
        };
    }
    static get elementRef() { return "hostElement"; }
    static get watchers() {
        return [{
                "propName": "afIsDone",
                "methodName": "afIsDoneHandler"
            }, {
                "propName": "afQuestion",
                "methodName": "validateQuestion"
            }];
    }
}
