import { Host, h } from "@stencil/core";
import axios from "axios";
import { alertCodeByStatus, cls, getMeta, toSnakeCase } from "../../utils/helpers";
import { Lang } from "../../services/lang";
import { Dialog } from "../../services/dialog";
import { Errors } from "../../services/errors";
export class XStep {
    constructor() {
        this.submit = undefined;
        this.active = undefined;
        this.disabled = undefined;
        this.status = 'ready';
        this.position = undefined;
        this.label = undefined;
        this.description = undefined;
        this.icon = undefined;
        this.index = undefined;
        this.validate = () => Promise.resolve();
        this.prevIcon = 'left';
        this.prevText = undefined;
        this.nextIcon = 'right';
        this.nextText = undefined;
        this.appendHeaders = {};
        this.loading = undefined;
    }
    /**
     * Element change active prop
     */
    watchActive(newValue) {
        if (newValue && this.el.querySelector('form')) {
            this.form = this.el.querySelector('form');
            this.onFormChangeDispatch();
            this.form.addEventListener('loading', this.onFormLoadingDispatch.bind(this));
            this.form.addEventListener('input', this.onFormChangeDispatch.bind(this));
        }
        if (!newValue && this.form) {
            this.form.removeEventListener('loading', this.onFormLoadingDispatch);
            this.form.removeEventListener('input', this.onFormChangeDispatch);
        }
    }
    /**
     * Watch Element disabled state change
     */
    watchDisabled() {
        this.parent.updateStepPositions();
    }
    /**
     * On component did loaded hook
     */
    componentDidLoad() {
        this.parent = this.el.closest('x-stepper');
    }
    /**
     * On form change loading state
     */
    onFormLoadingDispatch(e) {
        this.loading = e.detail;
    }
    /**
     * On form detect changes on some input
     */
    onFormChangeDispatch() {
        setTimeout(() => {
            this.status = this.form.checkValidity() ? 'valid' : 'invalid';
        }, 0);
    }
    /**
     * On press done button
     */
    onDone() {
        this.parent.dispatchEvent(new Event('done', { bubbles: false }));
    }
    /**
     * Go to the next step
     */
    nextStep() {
        this.loading = true;
        this.submitData()
            .then(() => this.validate())
            .then(() => this.parent.nextStep())
            .catch(err => console.warn(err))
            .finally(() => this.loading = false);
    }
    /**
     * Go to the previous step
     */
    prevStep() {
        this.parent.prevStep();
    }
    /**
     * Evaluate step and submit before change
     */
    submitData() {
        return new Promise((resolve, reject) => {
            var _a;
            if (!this.submit) {
                return resolve();
            }
            const form = this.el.querySelector('form');
            if (!form) {
                return resolve();
            }
            form.addEventListener('loading', (e) => {
                this.loading = e.detail;
            });
            if (form.closest('x-form')) {
                form.dispatchEvent(new SubmitEvent('submit', { bubbles: false, submitter: this.nextButton }));
            }
            else {
                const data = new FormData(form);
                for (const key in form.dataset) {
                    data.append(toSnakeCase(key), form.dataset[key]);
                }
                axios({
                    method: form.method,
                    url: (_a = form.action) !== null && _a !== void 0 ? _a : window.location.href,
                    data: data,
                    headers: Object.assign(Object.assign({}, this.appendHeaders), { 'Content-Type': form.enctype, 'X-CSRF-TOKEN': getMeta('csrf-token') }),
                }).then((response) => {
                    form.dispatchEvent(new CustomEvent('success', { bubbles: false, detail: response }));
                    response.status == 200 || response.status == 201 ? resolve() : reject(new Error(response.statusText));
                }).catch((err) => {
                    var _a, _b, _c, _d;
                    if (err === null || err === void 0 ? void 0 : err.response) {
                        const data = (_b = (_a = err.response) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {};
                        const hasValidationErrors = (_c = data.errors) !== null && _c !== void 0 ? _c : {};
                        if (hasValidationErrors) {
                            Errors.fill(data.errors);
                        }
                        Dialog({
                            message: (_d = data === null || data === void 0 ? void 0 : data.message) !== null && _d !== void 0 ? _d : data,
                            type: alertCodeByStatus(err.status)
                        });
                        form.dispatchEvent(new CustomEvent('failed', { bubbles: false, detail: err === null || err === void 0 ? void 0 : err.response }));
                    }
                    else {
                        Dialog.exception({ message: err.message });
                    }
                    reject(err);
                });
            }
        });
    }
    /**
     * Render element
     */
    render() {
        var _a, _b;
        return h(Host, { key: 'd07f17897df9a45e729d4b5831f87483e23b2834' }, h("div", { key: 'cb6d0cb8c4346d71f80ba9b4544115f7b3dc0a34', class: "step-header" }, h("div", { key: 'bd5af3723218167c0b00fb23f0a9b1f75f7e59f4', class: cls('step-indicator', { 'disabled': this.disabled, 'active': this.active }, `step-${this.status}`) }, this.icon ? h("x-icon", { name: this.icon, size: "1.5rem" }) : h("span", null, this.index + 1)), h("div", { key: '292c311dc673a8ca68470727aeaf5b4f50807514', class: "step-title" }, h("h4", { key: '2714d847b914a9ed1d486e1d29c9d77eb999c0ca' }, this.label), this.description && h("p", { key: '7e5751dd9933ff99a0b7c052e88ba6739da18fe5' }, this.description))), h("section", { key: 'c01b2843d83cae270d87f1dac3e8b8e60328ac95', class: cls({ 'step-disabled': this.disabled, 'step-active': this.active }, `step-${this.status}`) }, h("slot", { key: 'beec88899b305b818c0c242daa6363ecc47b323f' }), h("hr", { key: '1adc0845c6cb395c14670b7ebe581621a72f322e', class: "dashed" }), h("footer", { key: 'bc447aa73758c8158fce011df35a4c9eaa083311' }, this.position != 'first' && h("x-button", { key: 'ead576c3990f5b3a55c6cc64ccc458e4f32745a9', onClick: () => this.prevStep(), small: true, color: "default", icon: this.prevIcon }, Lang.get((_a = this.prevText) !== null && _a !== void 0 ? _a : 'stepper.back')), h("x-button", { key: 'fba5ca5b4f0628f98be07e6a7b721c1d90b5dae5', ref: el => this.nextButton = el, onClick: () => this.position == 'last' ? this.onDone() : this.nextStep(), loading: this.loading, disabled: this.loading || this.status == 'invalid', small: true, color: "primary", icon: this.nextIcon }, Lang.get((_b = this.nextText) !== null && _b !== void 0 ? _b : (this.position == 'last' ? 'stepper.finish' : 'stepper.next'))))));
    }
    static get is() { return "x-step"; }
    static get originalStyleUrls() {
        return {
            "$": ["./style.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["style.css"]
        };
    }
    static get properties() {
        return {
            "submit": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Submit the form on next/finish"
                },
                "attribute": "submit",
                "reflect": false
            },
            "active": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element disabled"
                },
                "attribute": "active",
                "reflect": false
            },
            "disabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element disabled"
                },
                "attribute": "disabled",
                "reflect": false
            },
            "status": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "StepperStepStatus",
                    "resolved": "\"invalid\" | \"ready\" | \"valid\"",
                    "references": {
                        "StepperStepStatus": {
                            "location": "local",
                            "path": "/opt/atlassian/pipelines/agent/build/src/components/x-stepper/component-step.tsx",
                            "id": "src/components/x-stepper/component-step.tsx::StepperStepStatus"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element state"
                },
                "attribute": "status",
                "reflect": false,
                "defaultValue": "'ready'"
            },
            "position": {
                "type": "string",
                "mutable": true,
                "complexType": {
                    "original": "StepperStepPosition",
                    "resolved": "\"first\" | \"last\" | \"middle\"",
                    "references": {
                        "StepperStepPosition": {
                            "location": "local",
                            "path": "/opt/atlassian/pipelines/agent/build/src/components/x-stepper/component-step.tsx",
                            "id": "src/components/x-stepper/component-step.tsx::StepperStepPosition"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Element state position"
                },
                "attribute": "position",
                "reflect": false
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element display label"
                },
                "attribute": "label",
                "reflect": false
            },
            "description": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element display label description"
                },
                "attribute": "description",
                "reflect": false
            },
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconType",
                    "resolved": "\"help\" | \"profile\" | \"watch\" | \"filter\" | \"map\" | \"info\" | \"error\" | \"document\" | \"data\" | \"label\" | \"link\" | \"menu\" | \"table\" | \"video\" | \"circle\" | \"image\" | \"marker\" | \"stop\" | \"download\" | \"sync\" | \"cursor\" | \"end\" | \"rotate\" | \"testing\" | \"copy\" | \"unknown\" | \"history\" | \"close\" | \"print\" | \"key\" | \"danger\" | \"tv\" | \"search\" | \"message\" | \"3ds-alt\" | \"3ds\" | \"abbreviation\" | \"activate\" | \"activity\" | \"allergies\" | \"answer\" | \"app-store\" | \"apple-pay\" | \"apple\" | \"ask-question\" | \"auth-capture\" | \"aws\" | \"back\" | \"backclear\" | \"badge-fingerprint\" | \"badge-package\" | \"badge-shield\" | \"bank-account\" | \"bank-cards\" | \"bank\" | \"barcode\" | \"basket\" | \"bin-card\" | \"bitcoin\" | \"bluetooth\" | \"bookmark\" | \"bot\" | \"bowl\" | \"brain\" | \"browser-chrome\" | \"browser-default\" | \"browser-edge\" | \"browser-firefox\" | \"browser-ie\" | \"browser-opera\" | \"browser-safari\" | \"bug\" | \"calendar-event\" | \"calendar\" | \"call-list\" | \"car\" | \"card-amex\" | \"card-banrural\" | \"card-diners_club\" | \"card-discover\" | \"card-jcb\" | \"card-mastercard\" | \"card-nfc\" | \"card-unionpay\" | \"card-visa\" | \"card-wallet\" | \"cash-register\" | \"certificate\" | \"chat\" | \"chatbot\" | \"chatgpt\" | \"check-circle\" | \"check\" | \"checkmark\" | \"chip-card\" | \"chip\" | \"clean\" | \"clipboard\" | \"clock\" | \"cloud-offline\" | \"cloud\" | \"coins\" | \"comment-3ds\" | \"comment-afs\" | \"comment-avs\" | \"comment-cavv\" | \"comment-cavvf\" | \"comment-cavvw\" | \"comment-cvn\" | \"comment-error\" | \"comment-info\" | \"comment-pos\" | \"comment-val\" | \"confectionery\" | \"configuration\" | \"connected\" | \"console\" | \"contactless-payment\" | \"credit-card\" | \"crop\" | \"crown\" | \"cube\" | \"cubes\" | \"currency-settings\" | \"cut-paper\" | \"cut\" | \"cutlery\" | \"dark-mode\" | \"dashboard\" | \"debit-card\" | \"decrease-decimal\" | \"delivered-mail\" | \"desktop\" | \"device-android\" | \"device-ios\" | \"device-linux\" | \"device-mac\" | \"device-other\" | \"device-ubuntu\" | \"device-windows\" | \"discount\" | \"divide\" | \"double-tick\" | \"down\" | \"download-report\" | \"drag-reorder\" | \"drop\" | \"dropdown\" | \"edit\" | \"estimate\" | \"eth\" | \"exchange-bitcoin\" | \"exchange-ethereum\" | \"exchange\" | \"external-link\" | \"face-id\" | \"facebook\" | \"file-archive\" | \"file-document\" | \"file-image\" | \"file-video\" | \"file\" | \"fill-color\" | \"fill-drip\" | \"filter-alt\" | \"finance-document\" | \"financial-changes\" | \"fingerprint\" | \"flag\" | \"format-blockquote\" | \"format-bold\" | \"format-code\" | \"format-header-1\" | \"format-header-2\" | \"format-header-3\" | \"format-header\" | \"format-icon\" | \"format-italic\" | \"format-line\" | \"format-paragraph\" | \"format-quote\" | \"format-redo\" | \"format-strikethrough\" | \"format-table\" | \"format-tip\" | \"format-underline\" | \"format-undo\" | \"forward\" | \"geo\" | \"giftcard\" | \"git\" | \"google-play\" | \"google\" | \"graph\" | \"hand\" | \"handcart\" | \"home-safety\" | \"home\" | \"hosted-checkout\" | \"hot-price\" | \"hourglass\" | \"idea\" | \"identification-documents\" | \"image-document\" | \"image-gallery\" | \"in-transit\" | \"inactive-state\" | \"increase-decimal\" | \"insert-money\" | \"instashop\" | \"invisible\" | \"invoice\" | \"job\" | \"js-squared\" | \"kitchen\" | \"lambda\" | \"lang-angular\" | \"lang-bash\" | \"lang-capacitor\" | \"lang-code\" | \"lang-cpp\" | \"lang-csharp\" | \"lang-css\" | \"lang-flutter\" | \"lang-go\" | \"lang-html\" | \"lang-ini\" | \"lang-ionic\" | \"lang-java\" | \"lang-js\" | \"lang-json\" | \"lang-kotlin\" | \"lang-laravel\" | \"lang-node-js\" | \"lang-objectivec\" | \"lang-php\" | \"lang-python\" | \"lang-react\" | \"lang-ruby\" | \"lang-sql\" | \"lang-swift\" | \"lang-typescript\" | \"lang-visual-basic\" | \"lang-vue\" | \"lang-xamarin\" | \"lang-xml\" | \"left\" | \"legal\" | \"licence\" | \"light-mode\" | \"list-bullet\" | \"list-numbered\" | \"list-todo\" | \"list\" | \"lock\" | \"love-fill\" | \"love\" | \"magic\" | \"mail-bulk\" | \"mail\" | \"mailbox-full\" | \"mailbox\" | \"mailing\" | \"mediaplayer\" | \"merchant-setting\" | \"merchant\" | \"mic\" | \"mindmap\" | \"minus-circle\" | \"minus\" | \"mobile\" | \"modules\" | \"money-time\" | \"mouse-scrolling\" | \"move\" | \"network-cable\" | \"network-group\" | \"network\" | \"nfc-checkpoint\" | \"nfc-tag\" | \"nfc\" | \"no-synchronize\" | \"node-js\" | \"notifications\" | \"october\" | \"offline\" | \"onboarding\" | \"online-shop\" | \"online-support\" | \"open-box\" | \"options\" | \"package-tag\" | \"package\" | \"paint-brush\" | \"palette\" | \"parking-meter\" | \"parking-prohibited\" | \"parking\" | \"pause\" | \"paycheque\" | \"pending\" | \"percentage\" | \"petition\" | \"phone\" | \"pie-chart-alt\" | \"pie-chart\" | \"pin\" | \"platform-edit\" | \"play\" | \"plus-circle\" | \"plus\" | \"power-off\" | \"prestashop\" | \"prize\" | \"qr\" | \"quickbooks\" | \"receipt-added\" | \"receipt-approved\" | \"receipt-declined\" | \"receipt-deleted\" | \"receipt-ticket\" | \"receipt\" | \"receive-cash\" | \"register\" | \"report\" | \"resend-mail\" | \"restaurant-menu\" | \"restaurant\" | \"rice-bowl\" | \"right\" | \"room-service\" | \"rotate-left\" | \"rotate-right\" | \"ruler\" | \"safe\" | \"sale\" | \"save-pdf\" | \"save\" | \"schedule\" | \"search-folder\" | \"select-circle\" | \"send\" | \"separate-document\" | \"settings-alt\" | \"settings\" | \"share\" | \"shield-lock\" | \"shield-warning\" | \"shield\" | \"ship\" | \"shipping-product\" | \"shopify\" | \"shopping-bag\" | \"shopping-cart\" | \"shopping\" | \"sim-card-sensor\" | \"sim-card\" | \"sound\" | \"sparkling\" | \"speaker\" | \"split\" | \"star-fill\" | \"star\" | \"stocks-growth\" | \"suspend\" | \"table-alt\" | \"tag\" | \"tags\" | \"test-tube\" | \"themes\" | \"three-ways\" | \"ticket\" | \"timer\" | \"toggle-off\" | \"toggle-on\" | \"toolkit\" | \"trash-disable\" | \"trash\" | \"truck\" | \"unavailable\" | \"unicorn\" | \"up-down-arrow\" | \"up\" | \"update\" | \"upload-cloud\" | \"upload\" | \"usb-stick\" | \"user-activity\" | \"user-admin\" | \"user-calendar\" | \"user-female\" | \"user-group\" | \"user-guide\" | \"user-male\" | \"user-permissions\" | \"user-tag\" | \"user\" | \"users-settings\" | \"vault\" | \"velocity\" | \"versions\" | \"visible\" | \"vtex\" | \"wallet\" | \"webhook\" | \"whatsapp\" | \"wi-fi\" | \"wired-network\" | \"withdraw\" | \"woocommerce\" | \"workflow\"",
                    "references": {
                        "IconType": {
                            "location": "import",
                            "path": "../../constants/icons",
                            "id": "src/constants/icons.ts::IconType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element icon name"
                },
                "attribute": "icon",
                "reflect": false
            },
            "index": {
                "type": "number",
                "mutable": true,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element index state"
                },
                "attribute": "index",
                "reflect": false
            },
            "validate": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "() => Promise<void>",
                    "resolved": "() => Promise<void>",
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "This function will fire before changing step"
                },
                "defaultValue": "() => Promise.resolve()"
            },
            "prevIcon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconType",
                    "resolved": "\"help\" | \"profile\" | \"watch\" | \"filter\" | \"map\" | \"info\" | \"error\" | \"document\" | \"data\" | \"label\" | \"link\" | \"menu\" | \"table\" | \"video\" | \"circle\" | \"image\" | \"marker\" | \"stop\" | \"download\" | \"sync\" | \"cursor\" | \"end\" | \"rotate\" | \"testing\" | \"copy\" | \"unknown\" | \"history\" | \"close\" | \"print\" | \"key\" | \"danger\" | \"tv\" | \"search\" | \"message\" | \"3ds-alt\" | \"3ds\" | \"abbreviation\" | \"activate\" | \"activity\" | \"allergies\" | \"answer\" | \"app-store\" | \"apple-pay\" | \"apple\" | \"ask-question\" | \"auth-capture\" | \"aws\" | \"back\" | \"backclear\" | \"badge-fingerprint\" | \"badge-package\" | \"badge-shield\" | \"bank-account\" | \"bank-cards\" | \"bank\" | \"barcode\" | \"basket\" | \"bin-card\" | \"bitcoin\" | \"bluetooth\" | \"bookmark\" | \"bot\" | \"bowl\" | \"brain\" | \"browser-chrome\" | \"browser-default\" | \"browser-edge\" | \"browser-firefox\" | \"browser-ie\" | \"browser-opera\" | \"browser-safari\" | \"bug\" | \"calendar-event\" | \"calendar\" | \"call-list\" | \"car\" | \"card-amex\" | \"card-banrural\" | \"card-diners_club\" | \"card-discover\" | \"card-jcb\" | \"card-mastercard\" | \"card-nfc\" | \"card-unionpay\" | \"card-visa\" | \"card-wallet\" | \"cash-register\" | \"certificate\" | \"chat\" | \"chatbot\" | \"chatgpt\" | \"check-circle\" | \"check\" | \"checkmark\" | \"chip-card\" | \"chip\" | \"clean\" | \"clipboard\" | \"clock\" | \"cloud-offline\" | \"cloud\" | \"coins\" | \"comment-3ds\" | \"comment-afs\" | \"comment-avs\" | \"comment-cavv\" | \"comment-cavvf\" | \"comment-cavvw\" | \"comment-cvn\" | \"comment-error\" | \"comment-info\" | \"comment-pos\" | \"comment-val\" | \"confectionery\" | \"configuration\" | \"connected\" | \"console\" | \"contactless-payment\" | \"credit-card\" | \"crop\" | \"crown\" | \"cube\" | \"cubes\" | \"currency-settings\" | \"cut-paper\" | \"cut\" | \"cutlery\" | \"dark-mode\" | \"dashboard\" | \"debit-card\" | \"decrease-decimal\" | \"delivered-mail\" | \"desktop\" | \"device-android\" | \"device-ios\" | \"device-linux\" | \"device-mac\" | \"device-other\" | \"device-ubuntu\" | \"device-windows\" | \"discount\" | \"divide\" | \"double-tick\" | \"down\" | \"download-report\" | \"drag-reorder\" | \"drop\" | \"dropdown\" | \"edit\" | \"estimate\" | \"eth\" | \"exchange-bitcoin\" | \"exchange-ethereum\" | \"exchange\" | \"external-link\" | \"face-id\" | \"facebook\" | \"file-archive\" | \"file-document\" | \"file-image\" | \"file-video\" | \"file\" | \"fill-color\" | \"fill-drip\" | \"filter-alt\" | \"finance-document\" | \"financial-changes\" | \"fingerprint\" | \"flag\" | \"format-blockquote\" | \"format-bold\" | \"format-code\" | \"format-header-1\" | \"format-header-2\" | \"format-header-3\" | \"format-header\" | \"format-icon\" | \"format-italic\" | \"format-line\" | \"format-paragraph\" | \"format-quote\" | \"format-redo\" | \"format-strikethrough\" | \"format-table\" | \"format-tip\" | \"format-underline\" | \"format-undo\" | \"forward\" | \"geo\" | \"giftcard\" | \"git\" | \"google-play\" | \"google\" | \"graph\" | \"hand\" | \"handcart\" | \"home-safety\" | \"home\" | \"hosted-checkout\" | \"hot-price\" | \"hourglass\" | \"idea\" | \"identification-documents\" | \"image-document\" | \"image-gallery\" | \"in-transit\" | \"inactive-state\" | \"increase-decimal\" | \"insert-money\" | \"instashop\" | \"invisible\" | \"invoice\" | \"job\" | \"js-squared\" | \"kitchen\" | \"lambda\" | \"lang-angular\" | \"lang-bash\" | \"lang-capacitor\" | \"lang-code\" | \"lang-cpp\" | \"lang-csharp\" | \"lang-css\" | \"lang-flutter\" | \"lang-go\" | \"lang-html\" | \"lang-ini\" | \"lang-ionic\" | \"lang-java\" | \"lang-js\" | \"lang-json\" | \"lang-kotlin\" | \"lang-laravel\" | \"lang-node-js\" | \"lang-objectivec\" | \"lang-php\" | \"lang-python\" | \"lang-react\" | \"lang-ruby\" | \"lang-sql\" | \"lang-swift\" | \"lang-typescript\" | \"lang-visual-basic\" | \"lang-vue\" | \"lang-xamarin\" | \"lang-xml\" | \"left\" | \"legal\" | \"licence\" | \"light-mode\" | \"list-bullet\" | \"list-numbered\" | \"list-todo\" | \"list\" | \"lock\" | \"love-fill\" | \"love\" | \"magic\" | \"mail-bulk\" | \"mail\" | \"mailbox-full\" | \"mailbox\" | \"mailing\" | \"mediaplayer\" | \"merchant-setting\" | \"merchant\" | \"mic\" | \"mindmap\" | \"minus-circle\" | \"minus\" | \"mobile\" | \"modules\" | \"money-time\" | \"mouse-scrolling\" | \"move\" | \"network-cable\" | \"network-group\" | \"network\" | \"nfc-checkpoint\" | \"nfc-tag\" | \"nfc\" | \"no-synchronize\" | \"node-js\" | \"notifications\" | \"october\" | \"offline\" | \"onboarding\" | \"online-shop\" | \"online-support\" | \"open-box\" | \"options\" | \"package-tag\" | \"package\" | \"paint-brush\" | \"palette\" | \"parking-meter\" | \"parking-prohibited\" | \"parking\" | \"pause\" | \"paycheque\" | \"pending\" | \"percentage\" | \"petition\" | \"phone\" | \"pie-chart-alt\" | \"pie-chart\" | \"pin\" | \"platform-edit\" | \"play\" | \"plus-circle\" | \"plus\" | \"power-off\" | \"prestashop\" | \"prize\" | \"qr\" | \"quickbooks\" | \"receipt-added\" | \"receipt-approved\" | \"receipt-declined\" | \"receipt-deleted\" | \"receipt-ticket\" | \"receipt\" | \"receive-cash\" | \"register\" | \"report\" | \"resend-mail\" | \"restaurant-menu\" | \"restaurant\" | \"rice-bowl\" | \"right\" | \"room-service\" | \"rotate-left\" | \"rotate-right\" | \"ruler\" | \"safe\" | \"sale\" | \"save-pdf\" | \"save\" | \"schedule\" | \"search-folder\" | \"select-circle\" | \"send\" | \"separate-document\" | \"settings-alt\" | \"settings\" | \"share\" | \"shield-lock\" | \"shield-warning\" | \"shield\" | \"ship\" | \"shipping-product\" | \"shopify\" | \"shopping-bag\" | \"shopping-cart\" | \"shopping\" | \"sim-card-sensor\" | \"sim-card\" | \"sound\" | \"sparkling\" | \"speaker\" | \"split\" | \"star-fill\" | \"star\" | \"stocks-growth\" | \"suspend\" | \"table-alt\" | \"tag\" | \"tags\" | \"test-tube\" | \"themes\" | \"three-ways\" | \"ticket\" | \"timer\" | \"toggle-off\" | \"toggle-on\" | \"toolkit\" | \"trash-disable\" | \"trash\" | \"truck\" | \"unavailable\" | \"unicorn\" | \"up-down-arrow\" | \"up\" | \"update\" | \"upload-cloud\" | \"upload\" | \"usb-stick\" | \"user-activity\" | \"user-admin\" | \"user-calendar\" | \"user-female\" | \"user-group\" | \"user-guide\" | \"user-male\" | \"user-permissions\" | \"user-tag\" | \"user\" | \"users-settings\" | \"vault\" | \"velocity\" | \"versions\" | \"visible\" | \"vtex\" | \"wallet\" | \"webhook\" | \"whatsapp\" | \"wi-fi\" | \"wired-network\" | \"withdraw\" | \"woocommerce\" | \"workflow\"",
                    "references": {
                        "IconType": {
                            "location": "import",
                            "path": "../../constants/icons",
                            "id": "src/constants/icons.ts::IconType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Prev button icon"
                },
                "attribute": "prev-icon",
                "reflect": false,
                "defaultValue": "'left'"
            },
            "prevText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Prev button text"
                },
                "attribute": "prev-text",
                "reflect": false
            },
            "nextIcon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IconType",
                    "resolved": "\"help\" | \"profile\" | \"watch\" | \"filter\" | \"map\" | \"info\" | \"error\" | \"document\" | \"data\" | \"label\" | \"link\" | \"menu\" | \"table\" | \"video\" | \"circle\" | \"image\" | \"marker\" | \"stop\" | \"download\" | \"sync\" | \"cursor\" | \"end\" | \"rotate\" | \"testing\" | \"copy\" | \"unknown\" | \"history\" | \"close\" | \"print\" | \"key\" | \"danger\" | \"tv\" | \"search\" | \"message\" | \"3ds-alt\" | \"3ds\" | \"abbreviation\" | \"activate\" | \"activity\" | \"allergies\" | \"answer\" | \"app-store\" | \"apple-pay\" | \"apple\" | \"ask-question\" | \"auth-capture\" | \"aws\" | \"back\" | \"backclear\" | \"badge-fingerprint\" | \"badge-package\" | \"badge-shield\" | \"bank-account\" | \"bank-cards\" | \"bank\" | \"barcode\" | \"basket\" | \"bin-card\" | \"bitcoin\" | \"bluetooth\" | \"bookmark\" | \"bot\" | \"bowl\" | \"brain\" | \"browser-chrome\" | \"browser-default\" | \"browser-edge\" | \"browser-firefox\" | \"browser-ie\" | \"browser-opera\" | \"browser-safari\" | \"bug\" | \"calendar-event\" | \"calendar\" | \"call-list\" | \"car\" | \"card-amex\" | \"card-banrural\" | \"card-diners_club\" | \"card-discover\" | \"card-jcb\" | \"card-mastercard\" | \"card-nfc\" | \"card-unionpay\" | \"card-visa\" | \"card-wallet\" | \"cash-register\" | \"certificate\" | \"chat\" | \"chatbot\" | \"chatgpt\" | \"check-circle\" | \"check\" | \"checkmark\" | \"chip-card\" | \"chip\" | \"clean\" | \"clipboard\" | \"clock\" | \"cloud-offline\" | \"cloud\" | \"coins\" | \"comment-3ds\" | \"comment-afs\" | \"comment-avs\" | \"comment-cavv\" | \"comment-cavvf\" | \"comment-cavvw\" | \"comment-cvn\" | \"comment-error\" | \"comment-info\" | \"comment-pos\" | \"comment-val\" | \"confectionery\" | \"configuration\" | \"connected\" | \"console\" | \"contactless-payment\" | \"credit-card\" | \"crop\" | \"crown\" | \"cube\" | \"cubes\" | \"currency-settings\" | \"cut-paper\" | \"cut\" | \"cutlery\" | \"dark-mode\" | \"dashboard\" | \"debit-card\" | \"decrease-decimal\" | \"delivered-mail\" | \"desktop\" | \"device-android\" | \"device-ios\" | \"device-linux\" | \"device-mac\" | \"device-other\" | \"device-ubuntu\" | \"device-windows\" | \"discount\" | \"divide\" | \"double-tick\" | \"down\" | \"download-report\" | \"drag-reorder\" | \"drop\" | \"dropdown\" | \"edit\" | \"estimate\" | \"eth\" | \"exchange-bitcoin\" | \"exchange-ethereum\" | \"exchange\" | \"external-link\" | \"face-id\" | \"facebook\" | \"file-archive\" | \"file-document\" | \"file-image\" | \"file-video\" | \"file\" | \"fill-color\" | \"fill-drip\" | \"filter-alt\" | \"finance-document\" | \"financial-changes\" | \"fingerprint\" | \"flag\" | \"format-blockquote\" | \"format-bold\" | \"format-code\" | \"format-header-1\" | \"format-header-2\" | \"format-header-3\" | \"format-header\" | \"format-icon\" | \"format-italic\" | \"format-line\" | \"format-paragraph\" | \"format-quote\" | \"format-redo\" | \"format-strikethrough\" | \"format-table\" | \"format-tip\" | \"format-underline\" | \"format-undo\" | \"forward\" | \"geo\" | \"giftcard\" | \"git\" | \"google-play\" | \"google\" | \"graph\" | \"hand\" | \"handcart\" | \"home-safety\" | \"home\" | \"hosted-checkout\" | \"hot-price\" | \"hourglass\" | \"idea\" | \"identification-documents\" | \"image-document\" | \"image-gallery\" | \"in-transit\" | \"inactive-state\" | \"increase-decimal\" | \"insert-money\" | \"instashop\" | \"invisible\" | \"invoice\" | \"job\" | \"js-squared\" | \"kitchen\" | \"lambda\" | \"lang-angular\" | \"lang-bash\" | \"lang-capacitor\" | \"lang-code\" | \"lang-cpp\" | \"lang-csharp\" | \"lang-css\" | \"lang-flutter\" | \"lang-go\" | \"lang-html\" | \"lang-ini\" | \"lang-ionic\" | \"lang-java\" | \"lang-js\" | \"lang-json\" | \"lang-kotlin\" | \"lang-laravel\" | \"lang-node-js\" | \"lang-objectivec\" | \"lang-php\" | \"lang-python\" | \"lang-react\" | \"lang-ruby\" | \"lang-sql\" | \"lang-swift\" | \"lang-typescript\" | \"lang-visual-basic\" | \"lang-vue\" | \"lang-xamarin\" | \"lang-xml\" | \"left\" | \"legal\" | \"licence\" | \"light-mode\" | \"list-bullet\" | \"list-numbered\" | \"list-todo\" | \"list\" | \"lock\" | \"love-fill\" | \"love\" | \"magic\" | \"mail-bulk\" | \"mail\" | \"mailbox-full\" | \"mailbox\" | \"mailing\" | \"mediaplayer\" | \"merchant-setting\" | \"merchant\" | \"mic\" | \"mindmap\" | \"minus-circle\" | \"minus\" | \"mobile\" | \"modules\" | \"money-time\" | \"mouse-scrolling\" | \"move\" | \"network-cable\" | \"network-group\" | \"network\" | \"nfc-checkpoint\" | \"nfc-tag\" | \"nfc\" | \"no-synchronize\" | \"node-js\" | \"notifications\" | \"october\" | \"offline\" | \"onboarding\" | \"online-shop\" | \"online-support\" | \"open-box\" | \"options\" | \"package-tag\" | \"package\" | \"paint-brush\" | \"palette\" | \"parking-meter\" | \"parking-prohibited\" | \"parking\" | \"pause\" | \"paycheque\" | \"pending\" | \"percentage\" | \"petition\" | \"phone\" | \"pie-chart-alt\" | \"pie-chart\" | \"pin\" | \"platform-edit\" | \"play\" | \"plus-circle\" | \"plus\" | \"power-off\" | \"prestashop\" | \"prize\" | \"qr\" | \"quickbooks\" | \"receipt-added\" | \"receipt-approved\" | \"receipt-declined\" | \"receipt-deleted\" | \"receipt-ticket\" | \"receipt\" | \"receive-cash\" | \"register\" | \"report\" | \"resend-mail\" | \"restaurant-menu\" | \"restaurant\" | \"rice-bowl\" | \"right\" | \"room-service\" | \"rotate-left\" | \"rotate-right\" | \"ruler\" | \"safe\" | \"sale\" | \"save-pdf\" | \"save\" | \"schedule\" | \"search-folder\" | \"select-circle\" | \"send\" | \"separate-document\" | \"settings-alt\" | \"settings\" | \"share\" | \"shield-lock\" | \"shield-warning\" | \"shield\" | \"ship\" | \"shipping-product\" | \"shopify\" | \"shopping-bag\" | \"shopping-cart\" | \"shopping\" | \"sim-card-sensor\" | \"sim-card\" | \"sound\" | \"sparkling\" | \"speaker\" | \"split\" | \"star-fill\" | \"star\" | \"stocks-growth\" | \"suspend\" | \"table-alt\" | \"tag\" | \"tags\" | \"test-tube\" | \"themes\" | \"three-ways\" | \"ticket\" | \"timer\" | \"toggle-off\" | \"toggle-on\" | \"toolkit\" | \"trash-disable\" | \"trash\" | \"truck\" | \"unavailable\" | \"unicorn\" | \"up-down-arrow\" | \"up\" | \"update\" | \"upload-cloud\" | \"upload\" | \"usb-stick\" | \"user-activity\" | \"user-admin\" | \"user-calendar\" | \"user-female\" | \"user-group\" | \"user-guide\" | \"user-male\" | \"user-permissions\" | \"user-tag\" | \"user\" | \"users-settings\" | \"vault\" | \"velocity\" | \"versions\" | \"visible\" | \"vtex\" | \"wallet\" | \"webhook\" | \"whatsapp\" | \"wi-fi\" | \"wired-network\" | \"withdraw\" | \"woocommerce\" | \"workflow\"",
                    "references": {
                        "IconType": {
                            "location": "import",
                            "path": "../../constants/icons",
                            "id": "src/constants/icons.ts::IconType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Next button icon"
                },
                "attribute": "next-icon",
                "reflect": false,
                "defaultValue": "'right'"
            },
            "nextText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Next button text"
                },
                "attribute": "next-text",
                "reflect": false
            },
            "appendHeaders": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "{[key: string]: string}",
                    "resolved": "{ [key: string]: string; }",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element append headers"
                },
                "defaultValue": "{}"
            },
            "loading": {
                "type": "boolean",
                "mutable": true,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Element loading state"
                },
                "attribute": "loading",
                "reflect": false
            }
        };
    }
    static get elementRef() { return "el"; }
    static get watchers() {
        return [{
                "propName": "active",
                "methodName": "watchActive"
            }, {
                "propName": "disabled",
                "methodName": "watchDisabled"
            }];
    }
}
