import { QuestionFieldType, QuestionReferenceType } from "@boldpenguin/sdk-types";
import { buildClassList, generateId } from "@boldpenguin/sdk-utility";
import { h } from "@stencil/core";
export class BpSdkDynamicInput {
    constructor() {
        this.answerId = undefined;
        this.answerPoolId = undefined;
        this.applicationFormId = undefined;
        this.choiceId = undefined;
        this.choiceIds = [];
        this.choices = undefined;
        this.code = undefined;
        this.displayType = undefined;
        this.errors = undefined;
        this.errorText = undefined;
        this.fieldType = undefined;
        this.helpText = undefined;
        this.inputComponentType = undefined;
        this.isAutocomplete = undefined;
        this.isCompleted = undefined;
        this.isCoverageType = true;
        this.isHidden = undefined;
        this.isLabelledField = false;
        this.isMultiple = undefined;
        this.isReadOnly = false;
        this.isRequired = undefined;
        this.isSensitive = undefined;
        this.isTrackable = undefined;
        this.label = undefined;
        this.labelId = 'a11y-';
        this.labelledBy = undefined;
        this.maxDate = undefined;
        this.maxValue = undefined;
        this.minDate = undefined;
        this.minValue = undefined;
        this.order = undefined;
        this.pattern = undefined;
        this.placeholder = undefined;
        this.pristine = true;
        this.questionId = undefined;
        this.questionGroupId = undefined;
        this.questionSetId = undefined;
        this.referenceType = undefined;
        this.showBusinessClassificationSelector = false;
        this.disableAddressAutocomplete = false;
        this.shouldShowInput = true;
        this.touched = false;
        this.text = undefined;
        this.useSelectAlias = false;
        this.value = undefined;
        this.answeredBySource = undefined;
        this.id = generateId(10);
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-dynamic-input');
        customElements.whenDefined('bp-sdk-external-dynamic-input').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-dynamic-input", { answerId: this.answerId, answerPoolId: this.answerPoolId, applicationFormId: this.applicationFormId, choiceId: this.choiceId, choiceIds: this.choiceIds, choices: this.choices, code: this.code, displayType: this.displayType, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, inputComponentType: this.inputComponentType, isAutocomplete: this.isAutocomplete, isCompleted: this.isCompleted, isCoverageType: this.isCoverageType, isHidden: this.isHidden, isLabelledField: this.isLabelledField, isMultiple: this.isMultiple, isReadOnly: this.isReadOnly, isRequired: this.isRequired, isSensitive: this.isSensitive, isTrackable: this.isTrackable, labelId: this.labelId, label: this.label, labelledBy: this.labelledBy, maxDate: this.maxDate, maxValue: this.maxValue, minDate: this.minDate, minValue: this.minValue, order: this.order, pattern: this.pattern, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, questionGroupId: this.questionGroupId, questionSetId: this.questionSetId, referenceType: this.referenceType, showBusinessClassificationSelector: this.showBusinessClassificationSelector, shouldShowInput: this.shouldShowInput, text: this.text, touched: this.touched, useSelectAlias: this.useSelectAlias, value: this.value }));
    }
    renderInternal() {
        return (this.shouldShowInput && (h("div", { id: this.id, class: buildClassList('bp-sdk-dynamic__container', {
                'bp-sdk-dynamic_container--labeled': this.isLabelledField,
            }) }, h("bp-sdk-message-outlet", { answerId: this.answerId }), this.fieldType !== QuestionFieldType.Label && this.renderQuestion(), this.fieldType === QuestionFieldType.Label && h("bp-sdk-label", { helpText: this.helpText, label: this.text, value: this.value }))));
    }
    renderQuestion() {
        const content = this.renderContent();
        if (!content) {
            this.componentMissing.emit(`Missing question type: ${this.fieldType} - ${this.code}`);
        }
        else {
            return content;
        }
    }
    renderContent() {
        switch (this.inputComponentType) {
            case QuestionFieldType.Text:
                return this.renderTextSwitch();
            case QuestionFieldType.VIN:
                return this.renderText();
            case QuestionFieldType.Masked:
                return this.renderMaskedInput();
            case QuestionFieldType.Date:
                return this.renderDate();
            case QuestionFieldType.DropDown:
                return this.renderDropdownSwitch();
            case QuestionFieldType.Dialog:
                return this.renderDialog();
            case QuestionFieldType.DriversLicense:
                return this.renderDriverLicense();
            case QuestionFieldType.CheckBox:
                return this.renderCheckbox();
            case QuestionFieldType.Radio:
                return this.renderRadio();
            case QuestionFieldType.CoverageType:
                return this.renderCoverageSelector();
            case QuestionFieldType.Anchor || QuestionFieldType.Step:
                return this.renderQuestionPoolItemContainer();
            case QuestionFieldType.DeletePool:
                return this.renderDeletePool();
            case QuestionFieldType.Vehicle:
                return this.renderVehicleAutocomplete();
            case QuestionFieldType.MonthYear:
                return this.renderMonthYear();
        }
    }
    renderTextSwitch() {
        switch (this.referenceType) {
            case QuestionReferenceType.Street1:
                return !this.disableAddressAutocomplete ? this.renderGooglePlacesAutocomplete() : this.renderText();
            case QuestionReferenceType.Increment:
                return this.renderIncrement();
            default:
                return this.renderText();
        }
    }
    renderGooglePlacesAutocomplete() {
        return (h("bp-sdk-google-places-autocomplete-container", { answeredBySource: this.answeredBySource, answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, filter: this.value, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, max: this.maxValue, min: this.minValue, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, referenceType: this.referenceType, required: this.isRequired, touched: this.touched }));
    }
    renderDriverLicense() {
        return (h("bp-sdk-driver-input-container", { answerId: this.answerId, answeredBySource: this.answeredBySource, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, max: this.maxValue, min: this.minValue, pattern: this.pattern, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, questionGroupId: this.questionGroupId, questionPoolId: this.answerPoolId, referenceType: this.referenceType, required: this.isRequired, text: this.value, touched: this.touched }));
    }
    renderIncrement() {
        return (h("bp-sdk-increment-input", { answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, max: this.maxValue, min: this.minValue, pattern: this.pattern, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, referenceType: this.referenceType, required: this.isRequired, text: this.value, touched: this.touched }));
    }
    renderText() {
        return (h("bp-sdk-text-input-container", { answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, max: this.maxValue, min: this.minValue, pattern: this.pattern, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, referenceType: this.referenceType, required: this.isRequired, text: this.value, touched: this.touched }));
    }
    renderMaskedInput() {
        return (h("bp-sdk-masked-input-container", { answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, max: this.maxValue, maxDate: this.maxDate, min: this.minValue, minDate: this.minDate, pattern: this.pattern, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, referenceType: this.referenceType, required: this.isRequired, touched: this.touched, value: this.value }));
    }
    renderDate() {
        if (this.isSensitive) {
            return this.renderMaskedInput();
        }
        else {
            return (h("bp-sdk-date-input-container", { answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, isSensitive: this.isSensitive, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, maxDate: this.maxDate, minDate: this.minDate, placeholder: this.placeholder, pattern: this.pattern, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, text: this.text, touched: this.touched, value: this.value }));
        }
    }
    renderMonthYear() {
        return (h("bp-sdk-month-year-input-container", { answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, isSensitive: this.isSensitive, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, maxDate: this.maxDate, minDate: this.minDate, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, text: this.text, touched: this.touched, value: this.value }));
    }
    renderDropdownSwitch() {
        switch (this.referenceType) {
            case QuestionReferenceType.LinesOfBusiness || QuestionReferenceType.LinesOfBusinessAdditional:
                return this.renderCoverageSelector();
            default: {
                return this.renderDropdownFallback();
            }
        }
    }
    renderDropdownFallback() {
        if (this.isAutocomplete) {
            return this.renderBcsSwitch();
        }
        else {
            return this.renderSelect();
        }
    }
    renderSelect() {
        return (h("bp-sdk-select-input-container", { answerId: this.answerId, choiceId: this.choiceId, choiceIds: this.choiceIds, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, multiple: this.isMultiple, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, referenceType: this.referenceType, required: this.isRequired, touched: this.touched, useAlias: this.useSelectAlias }));
    }
    renderBcsSwitch() {
        if (this.showBusinessClassificationSelector && this.referenceType === QuestionReferenceType.BusinessClass) {
            return this.renderBcs();
        }
        else {
            return this.renderAutocomplete();
        }
    }
    renderAutocomplete() {
        return (h("bp-sdk-autocomplete-naics-container", { answerId: this.answerId, choiceId: this.choiceId, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, touched: this.touched }));
    }
    renderBcs() {
        return (h("bp-sdk-business-classification-selector-container", { answerId: this.answerId, choiceId: this.choiceId, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, answeredBySource: this.answeredBySource, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, touched: this.touched }));
    }
    renderDialog() {
        return (h("bp-sdk-radio-dialog", { answeredBySource: this.answeredBySource, answerId: this.answerId, choiceId: this.choiceId, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, isRequired: this.isRequired, label: this.text, labelledBy: this.labelledBy, pristine: this.pristine, questionId: this.questionId, touched: this.touched }));
    }
    renderCheckbox() {
        return (h("bp-sdk-checkbox-input", { answeredBySource: this.answeredBySource, answerId: this.answerId, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.text, labelledBy: this.labelledBy, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, touched: this.touched, value: !!this.value }));
    }
    renderRadio() {
        return (h("bp-sdk-radio-input", { answeredBySource: this.answeredBySource, answerId: this.answerId, choiceId: this.choiceId, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.text, labelledBy: this.labelledBy, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, touched: this.touched }));
    }
    renderCoverageSelector() {
        return (h("bp-sdk-product-list-container", { answeredBySource: this.answeredBySource, answerId: this.answerId, choiceId: this.choiceId, choiceIds: this.choiceIds, choices: this.choices, code: this.code, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isMultiple: this.isMultiple, isReadOnly: this.isReadOnly, label: this.placeholder, labelledBy: this.labelledBy, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, touched: this.touched }));
    }
    renderQuestionPoolItemContainer() {
        return (h("bp-sdk-add-question-pool-item-container", { answerPoolId: this.answerPoolId, helpText: this.helpText, questionId: this.questionId, questionSetId: this.questionSetId, text: this.text }));
    }
    renderDeletePool() {
        return h("bp-sdk-delete-question-pool-item-container", { text: this.text, answerPoolId: this.answerPoolId });
    }
    renderVehicleAutocomplete() {
        return (h("bp-sdk-autocomplete-input", { allowFallthrough: this.referenceType != 'years', answeredBySource: this.answeredBySource, answerId: this.answerId, choiceId: this.choiceId, choices: this.choices, code: this.code, errors: this.errors, errorText: this.errorText, fieldType: this.fieldType, helpText: this.helpText, isCompleted: this.isCompleted, isReadOnly: this.isReadOnly, label: this.label, labelId: this.labelId, labelledBy: this.labelledBy, placeholder: this.placeholder, pristine: this.pristine, questionId: this.questionId, required: this.isRequired, showNoChoicesFallback: false, touched: this.touched }));
    }
    static get is() { return "bp-sdk-dynamic-input"; }
    static get originalStyleUrls() {
        return {
            "$": ["bp-sdk-dynamic-input.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-dynamic-input.css"]
        };
    }
    static get properties() {
        return {
            "answerId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Answer id"
                },
                "attribute": "answer-id",
                "reflect": false
            },
            "answerPoolId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Answer pool id"
                },
                "attribute": "answer-pool-id",
                "reflect": false
            },
            "applicationFormId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Application form id"
                },
                "attribute": "application-form-id",
                "reflect": false
            },
            "choiceId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Choice Id, should only be used on autocomplete, business-classification-selector, select, and radio inputs"
                },
                "attribute": "choice-id",
                "reflect": false
            },
            "choiceIds": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "string[] | undefined",
                    "resolved": "string[]",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Choice ids, should only be used on select-input or product-list"
                },
                "defaultValue": "[]"
            },
            "choices": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IChoice[] | undefined",
                    "resolved": "IChoice[]",
                    "references": {
                        "IChoice": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::IChoice"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Choices, used in any component that uses choiceId or ChoiceIds"
                }
            },
            "code": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question code"
                },
                "attribute": "code",
                "reflect": true
            },
            "displayType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'public' | 'private' | 'internal'",
                    "resolved": "\"internal\" | \"private\" | \"public\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Display type"
                },
                "attribute": "display-type",
                "reflect": false
            },
            "errors": {
                "type": "unknown",
                "mutable": true,
                "complexType": {
                    "original": "string[] | undefined",
                    "resolved": "string[]",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Error messages"
                }
            },
            "errorText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Error text"
                },
                "attribute": "error-text",
                "reflect": false
            },
            "fieldType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Field type"
                },
                "attribute": "field-type",
                "reflect": true
            },
            "helpText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Help text"
                },
                "attribute": "help-text",
                "reflect": false
            },
            "inputComponentType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Input component type"
                },
                "attribute": "input-component-type",
                "reflect": false
            },
            "isAutocomplete": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is autocomplete"
                },
                "attribute": "is-autocomplete",
                "reflect": false
            },
            "isCompleted": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is completed"
                },
                "attribute": "is-completed",
                "reflect": false
            },
            "isCoverageType": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is Coverage Type"
                },
                "attribute": "is-coverage-type",
                "reflect": false,
                "defaultValue": "true"
            },
            "isHidden": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is hidden"
                },
                "attribute": "is-hidden",
                "reflect": false
            },
            "isLabelledField": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is labelled field"
                },
                "attribute": "is-labelled-field",
                "reflect": false,
                "defaultValue": "false"
            },
            "isMultiple": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is multiple"
                },
                "attribute": "is-multiple",
                "reflect": false
            },
            "isReadOnly": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "When true, the field will be readonly. It will display only the label and value as plain text."
                },
                "attribute": "is-read-only",
                "reflect": false,
                "defaultValue": "false"
            },
            "isRequired": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is required"
                },
                "attribute": "is-required",
                "reflect": false
            },
            "isSensitive": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is sensitive"
                },
                "attribute": "is-sensitive",
                "reflect": false
            },
            "isTrackable": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is trackable"
                },
                "attribute": "is-trackable",
                "reflect": false
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Label to use"
                },
                "attribute": "label",
                "reflect": false
            },
            "labelId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Label id"
                },
                "attribute": "label-id",
                "reflect": false,
                "defaultValue": "'a11y-'"
            },
            "labelledBy": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Labels that describe group"
                },
                "attribute": "labelled-by",
                "reflect": false
            },
            "maxDate": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | Date",
                    "resolved": "Date | string",
                    "references": {
                        "Date": {
                            "location": "global",
                            "id": "global::Date"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Max date range"
                },
                "attribute": "max-date",
                "reflect": false
            },
            "maxValue": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Maximum length or value, depending on field type"
                },
                "attribute": "max-value",
                "reflect": false
            },
            "minDate": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | Date",
                    "resolved": "Date | string",
                    "references": {
                        "Date": {
                            "location": "global",
                            "id": "global::Date"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Minimum date range"
                },
                "attribute": "min-date",
                "reflect": false
            },
            "minValue": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Minimum value or length depending on field type"
                },
                "attribute": "min-value",
                "reflect": false
            },
            "order": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question order"
                },
                "attribute": "order",
                "reflect": false
            },
            "pattern": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Regex pattern answer is expected to conform to"
                },
                "attribute": "pattern",
                "reflect": false
            },
            "placeholder": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Placeholder text"
                },
                "attribute": "placeholder",
                "reflect": false
            },
            "pristine": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is pristine"
                },
                "attribute": "pristine",
                "reflect": false,
                "defaultValue": "true"
            },
            "questionId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question Id"
                },
                "attribute": "question-id",
                "reflect": false
            },
            "questionGroupId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question Group Id"
                },
                "attribute": "question-group-id",
                "reflect": false
            },
            "questionSetId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question Set id"
                },
                "attribute": "question-set-id",
                "reflect": false
            },
            "referenceType": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question reference type"
                },
                "attribute": "reference-type",
                "reflect": true
            },
            "showBusinessClassificationSelector": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Show business class selector"
                },
                "attribute": "show-business-classification-selector",
                "reflect": false,
                "defaultValue": "false"
            },
            "disableAddressAutocomplete": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Disables Google Autocomplete for address groups when true"
                },
                "attribute": "disable-address-autocomplete",
                "reflect": false,
                "defaultValue": "false"
            },
            "shouldShowInput": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Should show input"
                },
                "attribute": "should-show-input",
                "reflect": false,
                "defaultValue": "true"
            },
            "touched": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Is touched"
                },
                "attribute": "touched",
                "reflect": false,
                "defaultValue": "false"
            },
            "text": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question text"
                },
                "attribute": "text",
                "reflect": false
            },
            "useSelectAlias": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Use select alias"
                },
                "attribute": "use-select-alias",
                "reflect": false,
                "defaultValue": "false"
            },
            "value": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Question value"
                },
                "attribute": "value",
                "reflect": false
            },
            "answeredBySource": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifically how the question was answered (ie. \"ACORD 126\")"
                },
                "attribute": "answered-by-source",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "id": {},
            "useExternal": {}
        };
    }
    static get events() {
        return [{
                "method": "componentMissing",
                "name": "componentMissing",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Notification component could not be classified for a answer"
                },
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                }
            }];
    }
}
