"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.n = (module)=>{
        var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    AtomicGeneratedAnswer: ()=>AtomicGeneratedAnswer
});
const bueno_namespaceObject = require("@coveo/bueno");
const headless_namespaceObject = require("@coveo/headless");
const external_lit_namespaceObject = require("lit");
const decorators_js_namespaceObject = require("lit/decorators.js");
const class_map_js_namespaceObject = require("lit/directives/class-map.js");
const when_js_namespaceObject = require("lit/directives/when.js");
const generated_answer_controller_cjs_namespaceObject = require("../../common/generated-answer/generated-answer-controller.cjs");
require("../../common/atomic-generated-answer-thread/atomic-generated-answer-thread.cjs");
require("../../common/atomic-ask-follow-up-input/atomic-ask-follow-up-input.cjs");
const render_answer_content_cjs_namespaceObject = require("../../common/generated-answer/render-answer-content.cjs");
const render_card_header_cjs_namespaceObject = require("../../common/generated-answer/render-card-header.cjs");
const render_citations_cjs_namespaceObject = require("../../common/generated-answer/render-citations.cjs");
const render_custom_no_answer_message_cjs_namespaceObject = require("../../common/generated-answer/render-custom-no-answer-message.cjs");
const render_disclaimer_cjs_namespaceObject = require("../../common/generated-answer/render-disclaimer.cjs");
const render_feedback_and_copy_buttons_cjs_namespaceObject = require("../../common/generated-answer/render-feedback-and-copy-buttons.cjs");
const validate_props_controller_cjs_namespaceObject = require("../../common/validate-props-controller/validate-props-controller.cjs");
const array_converter_cjs_namespaceObject = require("../../../converters/array-converter.cjs");
const boolean_converter_cjs_namespaceObject = require("../../../converters/boolean-converter.cjs");
const legacy_array_string_converter_cjs_namespaceObject = require("../../../converters/legacy-array-string-converter.cjs");
const bind_state_cjs_namespaceObject = require("../../../decorators/bind-state.cjs");
const binding_guard_cjs_namespaceObject = require("../../../decorators/binding-guard.cjs");
const bindings_cjs_namespaceObject = require("../../../decorators/bindings.cjs");
const error_guard_cjs_namespaceObject = require("../../../decorators/error-guard.cjs");
const with_tailwind_styles_cjs_namespaceObject = require("../../../decorators/with-tailwind-styles.cjs");
const accessibility_utils_cjs_namespaceObject = require("../../../utils/accessibility-utils.cjs");
const debounce_utils_cjs_namespaceObject = require("../../../utils/debounce-utils.cjs");
const slot_utils_cjs_namespaceObject = require("../../../utils/slot-utils.cjs");
const tab_utils_cjs_namespaceObject = require("../../../utils/tab-utils.cjs");
const external_atomic_generated_answer_tw_css_cjs_namespaceObject = require("./atomic-generated-answer.tw.css.cjs");
var external_atomic_generated_answer_tw_css_cjs_default = /*#__PURE__*/ __webpack_require__.n(external_atomic_generated_answer_tw_css_cjs_namespaceObject);
function _ts_decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
    else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function _ts_metadata(k, v) {
    if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
}
const GENERATED_ANSWER_THREAD_EXPORT_PARTS = "feedback-and-copy-buttons,feedback-button,copy-button,citations-label,citation,citation-popover,generated-text,answer-code-block,answer-emphasis,answer-inline-code,answer-heading-1,answer-heading-2,answer-heading-3,answer-heading-4,answer-heading-5,answer-heading-6,answer-list-item,answer-link,answer-link-text,answer-link-icon,answer-ordered-list,answer-paragraph,answer-quote-block,answer-unordered-list,answer-strong,answer-table,answer-table-container,answer-table-content,answer-table-header";
const FOLLOW_UP_INPUT_EXPORT_PARTS = "input-container,input-field,submit-button,submit-icon";
class AtomicGeneratedAnswer extends external_lit_namespaceObject.LitElement {
    initialize() {
        if (this.tabsIncluded.length > 0 && this.tabsExcluded.length > 0) console.warn('Values for both "tabs-included" and "tabs-excluded" have been provided. This could lead to unexpected behaviors.');
        this.controller = new generated_answer_controller_cjs_namespaceObject.GeneratedAnswerController(this, {
            withToggle: this.withToggle,
            getGeneratedAnswer: ()=>this.generatedAnswer,
            getGeneratedAnswerState: ()=>this.generatedAnswerState,
            getSearchStatusState: ()=>this.searchStatusState,
            getBindings: ()=>this.bindings
        });
        this.generatedAnswer = (0, headless_namespaceObject.buildGeneratedAnswer)(this.bindings.engine, {
            initialState: {
                isVisible: this.controller.data.isVisible,
                responseFormat: {
                    contentFormat: [
                        'text/markdown',
                        'text/plain'
                    ]
                }
            },
            ...this.answerConfigurationId && {
                answerConfigurationId: this.answerConfigurationId
            },
            ...this.agentId && {
                agentId: this.agentId
            },
            fieldsToIncludeInCitations: this.getCitationFields()
        });
        this.searchStatus = (0, headless_namespaceObject.buildSearchStatus)(this.bindings.engine);
        this.tabManager = (0, headless_namespaceObject.buildTabManager)(this.bindings.engine);
        this.controller.insertFeedbackModal();
        if (window.ResizeObserver && this.collapsible) {
            const debouncedAdaptAnswerHeight = (0, debounce_utils_cjs_namespaceObject.debounce)(()=>this.adaptAnswerHeight(), 100);
            this.resizeObserver = new ResizeObserver(debouncedAdaptAnswerHeight);
            this.resizeObserver.observe(this);
        }
    }
    disconnectedCallback() {
        super.disconnectedCallback();
        this.resizeObserver?.disconnect();
    }
    willUpdate(changedProperties) {
        if (changedProperties.has('tabManagerState')) {
            const oldValue = changedProperties.get('tabManagerState');
            if (oldValue && this.tabManagerState?.activeTab !== oldValue?.activeTab) if ((0, tab_utils_cjs_namespaceObject.shouldDisplayOnCurrentTab)(this.tabsIncluded, this.tabsExcluded, this.tabManagerState?.activeTab)) this.generatedAnswer.enable();
            else this.generatedAnswer.disable();
        }
        if (changedProperties.has('generatedAnswerState')) {
            const oldState = changedProperties.get('generatedAnswerState');
            if (oldState && this.generatedAnswerState?.expanded !== oldState?.expanded && this.isCollapsibleEnabled) {
                const container = this.getAnswerContainer();
                if (container) this.toggleClass(container, 'answer-collapsed', !this.generatedAnswerState.expanded);
            }
        }
        if ((changedProperties.has('collapsible') || changedProperties.has('agentId')) && !this.isCollapsibleEnabled) this.resetCollapsibleStyles();
    }
    render() {
        if (!(0, tab_utils_cjs_namespaceObject.shouldDisplayOnCurrentTab)(this.tabsIncluded, this.tabsExcluded, this.tabManagerState?.activeTab)) return external_lit_namespaceObject.nothing;
        const contentClasses = 'mx-auto mt-0 mb-4 border border-neutral shadow-lg bg-background rounded-lg text-on-background';
        if (this.hasNoAnswerGenerated) {
            if (this.generatedAnswerState?.cannotAnswer && this.hasCustomNoAnswerMessage) return (0, external_lit_namespaceObject.html)`
          <div>
            <aside
              class=${contentClasses}
              part="container"
              aria-label=${this.bindings.i18n.t('generated-answer-title')}
            >
              <div part="generated-content">
                ${this.renderCardHeaderWrapper()}
                ${(0, when_js_namespaceObject.when)(this.isAnswerVisible, ()=>(0, external_lit_namespaceObject.html)`<article>${(0, render_custom_no_answer_message_cjs_namespaceObject.renderCustomNoAnswerMessage)()}</article>`)}
              </div>
            </aside>
          </div>
        `;
            return external_lit_namespaceObject.nothing;
        }
        return (0, external_lit_namespaceObject.html)`
      <div>
        <aside
          class=${contentClasses}
          part="container"
          aria-label=${this.bindings.i18n.t('generated-answer-title')}
        >
          <div part="generated-content">
            ${this.renderCardHeaderWrapper()}
            ${(0, when_js_namespaceObject.when)(this.isAnswerVisible, ()=>(0, external_lit_namespaceObject.html)` <div part="generated-content-container" class="pb-6">
                  <div
                    class=${(0, class_map_js_namespaceObject.classMap)({
                'px-6': true,
                'pt-6': true,
                'generated-answer-content-background': this.areFollowUpsEnabled,
                'agent-scrollable': this.areFollowUpsEnabled
            })}
                  >
                    <article>${this.renderAnswerContent()}</article>
                  </div>
                  <div
                    class=${(0, class_map_js_namespaceObject.classMap)({
                'px-6': true,
                'pt-2': true,
                'border-t': this.areFollowUpsEnabled,
                'border-gray-200': this.areFollowUpsEnabled
            })}
                  >
                    ${this.renderAskFollowUpInputWrapper()}
                    ${(0, render_disclaimer_cjs_namespaceObject.renderDisclaimer)({
                props: {
                    i18n: this.bindings.i18n
                }
            })}
                  </div>
                </div>`)}
          </div>
        </aside>
      </div>
    `;
    }
    get hasNoAnswerGenerated() {
        return this.controller.hasNoAnswerGenerated;
    }
    get isAnswerVisible() {
        return this.controller.isAnswerVisible;
    }
    get toggleTooltip() {
        return this.controller.getToggleTooltip();
    }
    get copyToClipboardTooltip() {
        return this.controller.getCopyToClipboardTooltip(this.copied, this.copyError);
    }
    get hasCustomNoAnswerMessage() {
        return (0, slot_utils_cjs_namespaceObject.getNamedSlotContent)(this, 'no-answer-message').length > 0;
    }
    async copyToClipboard(answer) {
        await this.controller.copyToClipboard(answer, ()=>{
            this.copied = true;
            setTimeout(()=>{
                this.copied = false;
            }, 2000);
        }, ()=>{
            this.copyError = true;
            setTimeout(()=>{
                this.copyError = false;
            }, 2000);
        });
    }
    clickOnShowButton() {
        this.controller.clickOnShowButton();
    }
    getCitationFields() {
        let fields = [];
        if (Array.isArray(this.fieldsToIncludeInCitations)) fields = this.fieldsToIncludeInCitations;
        else if ('string' == typeof this.fieldsToIncludeInCitations) fields = this.fieldsToIncludeInCitations.split(',').map((f)=>f.trim()).filter((f)=>f.length > 0);
        return fields.concat(this.REQUIRED_FIELDS_TO_INCLUDE_IN_CITATIONS);
    }
    validateMaxCollapsedHeight() {
        const isValid = this.maxCollapsedHeight >= this.MIN_COLLAPSED_HEIGHT && this.maxCollapsedHeight <= this.MAX_COLLAPSED_HEIGHT;
        if (!isValid) console.warn(`max-collapsed-height (${this.maxCollapsedHeight}rem) is out of the valid range (${this.MIN_COLLAPSED_HEIGHT}rem - ${this.MAX_COLLAPSED_HEIGHT}rem). Falling back to default value (${this.DEFAULT_COLLAPSED_HEIGHT}rem).`);
        return isValid ? this.maxCollapsedHeight : this.DEFAULT_COLLAPSED_HEIGHT;
    }
    toggleClass(element, className, condition) {
        element.classList.toggle(className, condition);
    }
    adaptAnswerHeight() {
        const answerHeight = this.shadowRoot?.querySelector('[part="generated-text"]')?.getBoundingClientRect().height;
        if (answerHeight) {
            const rootFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
            const nextFullAnswerHeight = answerHeight / rootFontSize;
            if (this.fullAnswerHeight !== nextFullAnswerHeight) {
                this.fullAnswerHeight = nextFullAnswerHeight;
                this.requestUpdate();
            }
            this.updateAnswerHeight();
        }
    }
    getAnswerContainer() {
        return this.shadowRoot?.querySelector('[part="generated-container"]');
    }
    getAnswerFooter() {
        return this.shadowRoot?.querySelector('[part="generated-answer-footer"]');
    }
    setCSSVariable(variableName, value) {
        const container = this.getAnswerContainer();
        if (container) container.style.setProperty(variableName, value);
    }
    updateAnswerHeight() {
        const container = this.getAnswerContainer();
        const footer = this.getAnswerFooter();
        const maxHeight = this.validateMaxCollapsedHeight();
        if (!container || !footer) return;
        if (this.fullAnswerHeight > maxHeight) {
            this.setCSSVariable('--atomic-crga-collapsed-height', `${maxHeight}rem`);
            this.toggleClass(container, 'answer-collapsed', !this.generatedAnswerState.expanded);
            this.toggleClass(footer, 'is-collapsible', true);
            this.toggleClass(footer, 'generating-label-visible', this.generatedAnswerState.isStreaming);
        } else {
            this.toggleClass(container, 'answer-collapsed', false);
            this.toggleClass(footer, 'is-collapsible', false);
            this.toggleClass(footer, 'generating-label-visible', false);
        }
    }
    clickDislike() {
        this.controller.clickDislike();
    }
    clickLike() {
        this.controller.clickLike();
    }
    renderCitationsList(citations, answerId) {
        return (0, render_citations_cjs_namespaceObject.renderCitations)({
            props: {
                citations,
                i18n: this.bindings.i18n,
                buildInteractiveCitation: (citation)=>(0, headless_namespaceObject.buildInteractiveCitation)(this.bindings.engine, {
                        options: {
                            citation,
                            answerId
                        }
                    }),
                logCitationHover: (citationId, citationHoverTimeMs)=>{
                    this.generatedAnswer?.logCitationHover(citationId, citationHoverTimeMs, answerId);
                },
                disableCitationAnchoring: this.disableCitationAnchoring
            }
        });
    }
    renderFeedbackAndCopyButtonsWrapper() {
        return (0, render_feedback_and_copy_buttons_cjs_namespaceObject.renderFeedbackAndCopyButtons)({
            props: {
                i18n: this.bindings.i18n,
                generatedAnswerActionsState: {
                    liked: this.generatedAnswerState.liked,
                    disliked: this.generatedAnswerState.disliked,
                    isStreaming: this.generatedAnswerState.isStreaming,
                    isLoading: this.generatedAnswerState.isLoading,
                    answer: this.generatedAnswerState.answer
                },
                copied: this.copied,
                copyError: this.copyError,
                getCopyToClipboardTooltip: ()=>this.copyToClipboardTooltip,
                onClickLike: ()=>this.clickLike(),
                onClickDislike: ()=>this.clickDislike(),
                onCopyToClipboard: (answer)=>this.copyToClipboard(answer)
            }
        });
    }
    renderAnswerContent() {
        if (this.areFollowUpsEnabled) {
            const generatedAnswerWithQuestion = {
                ...this.generatedAnswerState,
                question: this.bindings.engine.state.query?.q ?? ''
            };
            const allGeneratedAnswers = [
                generatedAnswerWithQuestion,
                ...this.generatedAnswerWithFollowUps?.state.followUpAnswers.followUpAnswers ?? []
            ];
            return (0, external_lit_namespaceObject.html)`<atomic-generated-answer-thread
        .generatedAnswers=${allGeneratedAnswers}
        .i18n=${this.bindings.i18n}
        .renderCitations=${this.renderCitationsList.bind(this)}
        .onClickLike=${(answerId)=>this.generatedAnswerWithFollowUps?.like(answerId)}
        .onClickDislike=${(answerId)=>this.generatedAnswerWithFollowUps?.dislike(answerId)}
        .onCopyToClipboard=${(answerId)=>this.generatedAnswerWithFollowUps?.logCopyToClipboard(answerId)}
        exportparts=${GENERATED_ANSWER_THREAD_EXPORT_PARTS}
      ></atomic-generated-answer-thread>`;
        }
        return (0, render_answer_content_cjs_namespaceObject.renderAnswerContent)({
            props: {
                i18n: this.bindings.i18n,
                generatedAnswer: this.generatedAnswerState,
                collapsible: this.isCollapsibleEnabled,
                renderFeedbackAndCopyButtonsSlot: ()=>this.renderFeedbackAndCopyButtonsWrapper(),
                renderCitationsSlot: ()=>(0, external_lit_namespaceObject.html)`${this.renderCitationsList(this.generatedAnswerState.citations)}`,
                onRetry: ()=>this.generatedAnswer?.retry(),
                onClickShowButton: ()=>this.clickOnShowButton()
            }
        });
    }
    get hasAgentId() {
        return Boolean(this.agentId);
    }
    get generatedAnswerWithFollowUps() {
        if (!this.hasAgentId || !this.generatedAnswer || !('askFollowUp' in this.generatedAnswer)) return;
        return this.generatedAnswer;
    }
    get areFollowUpsEnabled() {
        return this.generatedAnswerWithFollowUps?.state.followUpAnswers?.isEnabled === true;
    }
    get isCollapsibleEnabled() {
        return this.collapsible && !this.areFollowUpsEnabled && (this.fullAnswerHeight ?? 0) > this.validateMaxCollapsedHeight();
    }
    resetCollapsibleStyles() {
        const container = this.getAnswerContainer();
        const footer = this.getAnswerFooter();
        if (!container || !footer) return;
        this.toggleClass(container, 'answer-collapsed', false);
        this.toggleClass(footer, 'is-collapsible', false);
        this.toggleClass(footer, 'generating-label-visible', false);
    }
    renderCardHeaderWrapper() {
        return (0, render_card_header_cjs_namespaceObject.renderCardHeader)({
            props: {
                i18n: this.bindings.i18n,
                isAnswerVisible: this.isAnswerVisible,
                toggleTooltip: this.toggleTooltip,
                withToggle: this.withToggle,
                onToggle: (checked)=>{
                    checked ? this.generatedAnswer?.show() : this.generatedAnswer?.hide();
                }
            }
        });
    }
    get isAnswerGenerationOngoing() {
        const initialAnswerPending = this.generatedAnswerState.isStreaming || this.generatedAnswerState.isLoading;
        return initialAnswerPending || (this.generatedAnswerWithFollowUps?.state.followUpAnswers?.followUpAnswers?.some((answer)=>answer.isStreaming || answer.isLoading) ?? false);
    }
    async handleAskFollowUp(question) {
        if (this.areFollowUpsEnabled) await this.generatedAnswerWithFollowUps?.askFollowUp(question);
    }
    renderAskFollowUpInputWrapper() {
        if (!this.areFollowUpsEnabled) return external_lit_namespaceObject.nothing;
        return (0, external_lit_namespaceObject.html)` <div class="my-2">
      <atomic-ask-follow-up-input
        .i18n=${this.bindings.i18n}
        .askFollowUp=${this.handleAskFollowUp.bind(this)}
        .submitButtonDisabled=${this.isAnswerGenerationOngoing}
        exportparts=${FOLLOW_UP_INPUT_EXPORT_PARTS}
      >
      </atomic-ask-follow-up-input>
    </div>`;
    }
    constructor(){
        super(), this.DEFAULT_COLLAPSED_HEIGHT = 16, this.MAX_COLLAPSED_HEIGHT = 32, this.MIN_COLLAPSED_HEIGHT = 9, this.REQUIRED_FIELDS_TO_INCLUDE_IN_CITATIONS = [
            'filetype'
        ], this.withToggle = false, this.collapsible = false, this.maxCollapsedHeight = this.DEFAULT_COLLAPSED_HEIGHT, this.disableCitationAnchoring = false, this.tabsIncluded = [], this.tabsExcluded = [], this.copied = false, this.copyError = false, this.ariaMessage = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'generated-answer'), this.onGeneratedAnswerStateUpdate = ()=>{
            if (this.generatedAnswerState.isVisible !== this.controller.data.isVisible) {
                this.controller.data = {
                    ...this.controller.data,
                    isVisible: this.generatedAnswerState.isVisible
                };
                this.controller.writeStoredData(this.controller.data);
            }
            this.ariaMessage.message = this.controller.getGeneratedAnswerStatus();
        };
        new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
                maxCollapsedHeight: this.maxCollapsedHeight
            }), AtomicGeneratedAnswer.propsSchema, false);
    }
}
AtomicGeneratedAnswer.styles = [
    external_atomic_generated_answer_tw_css_cjs_default()
];
AtomicGeneratedAnswer.propsSchema = new bueno_namespaceObject.Schema({
    maxCollapsedHeight: new bueno_namespaceObject.NumberValue({
        min: 9,
        max: 32,
        required: false
    })
});
AtomicGeneratedAnswer.fieldsToIncludeInCitationsConverter = (0, legacy_array_string_converter_cjs_namespaceObject.createLegacyArrayStringConverter)((value)=>{
    console.warn(`Starting from Atomic v4, the "fields-to-include-in-citations" property will only accept an array of strings. Using a comma-separated string value ("${value}") is now deprecated. Please update the value to be a JSON array. For example: fields-to-include-in-citations='["fieldA","fieldB"]'`);
});
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Boolean,
        attribute: 'with-toggle',
        converter: boolean_converter_cjs_namespaceObject.booleanConverter
    })
], AtomicGeneratedAnswer.prototype, "withToggle", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Boolean,
        converter: boolean_converter_cjs_namespaceObject.booleanConverter
    })
], AtomicGeneratedAnswer.prototype, "collapsible", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Number,
        attribute: 'max-collapsed-height'
    })
], AtomicGeneratedAnswer.prototype, "maxCollapsedHeight", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: String,
        attribute: 'answer-configuration-id'
    }),
    _ts_metadata("design:type", String)
], AtomicGeneratedAnswer.prototype, "answerConfigurationId", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: String,
        attribute: 'agent-id'
    }),
    _ts_metadata("design:type", String)
], AtomicGeneratedAnswer.prototype, "agentId", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: String,
        attribute: 'fields-to-include-in-citations',
        converter: AtomicGeneratedAnswer.fieldsToIncludeInCitationsConverter
    }),
    _ts_metadata("design:type", String)
], AtomicGeneratedAnswer.prototype, "fieldsToIncludeInCitations", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Boolean,
        attribute: 'disable-citation-anchoring',
        converter: boolean_converter_cjs_namespaceObject.booleanConverter
    })
], AtomicGeneratedAnswer.prototype, "disableCitationAnchoring", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Array,
        attribute: 'tabs-included',
        converter: array_converter_cjs_namespaceObject.arrayConverter
    }),
    _ts_metadata("design:type", Array)
], AtomicGeneratedAnswer.prototype, "tabsIncluded", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.property)({
        type: Array,
        attribute: 'tabs-excluded',
        converter: array_converter_cjs_namespaceObject.arrayConverter
    }),
    _ts_metadata("design:type", Array)
], AtomicGeneratedAnswer.prototype, "tabsExcluded", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.state)(),
    _ts_metadata("design:type", "u" < typeof Bindings ? Object : Bindings)
], AtomicGeneratedAnswer.prototype, "bindings", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.state)(),
    _ts_metadata("design:type", "u" < typeof Error ? Object : Error)
], AtomicGeneratedAnswer.prototype, "error", void 0);
_ts_decorate([
    (0, bind_state_cjs_namespaceObject.bindStateToController)('generatedAnswer', {
        onUpdateCallbackMethod: 'onGeneratedAnswerStateUpdate'
    }),
    (0, decorators_js_namespaceObject.state)(),
    _ts_metadata("design:type", "u" < typeof GeneratedAnswerState ? Object : GeneratedAnswerState)
], AtomicGeneratedAnswer.prototype, "generatedAnswerState", void 0);
_ts_decorate([
    (0, bind_state_cjs_namespaceObject.bindStateToController)('searchStatus'),
    (0, decorators_js_namespaceObject.state)(),
    _ts_metadata("design:type", "u" < typeof SearchStatusState ? Object : SearchStatusState)
], AtomicGeneratedAnswer.prototype, "searchStatusState", void 0);
_ts_decorate([
    (0, bind_state_cjs_namespaceObject.bindStateToController)('tabManager'),
    (0, decorators_js_namespaceObject.state)(),
    _ts_metadata("design:type", "u" < typeof TabManagerState ? Object : TabManagerState)
], AtomicGeneratedAnswer.prototype, "tabManagerState", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.state)()
], AtomicGeneratedAnswer.prototype, "copied", void 0);
_ts_decorate([
    (0, decorators_js_namespaceObject.state)()
], AtomicGeneratedAnswer.prototype, "copyError", void 0);
_ts_decorate([
    (0, binding_guard_cjs_namespaceObject.bindingGuard)(),
    (0, error_guard_cjs_namespaceObject.errorGuard)(),
    _ts_metadata("design:type", Function),
    _ts_metadata("design:paramtypes", []),
    _ts_metadata("design:returntype", void 0)
], AtomicGeneratedAnswer.prototype, "render", null);
AtomicGeneratedAnswer = _ts_decorate([
    (0, decorators_js_namespaceObject.customElement)('atomic-generated-answer'),
    (0, bindings_cjs_namespaceObject.bindings)(),
    with_tailwind_styles_cjs_namespaceObject.withTailwindStyles,
    _ts_metadata("design:type", Function),
    _ts_metadata("design:paramtypes", [])
], AtomicGeneratedAnswer);
exports.AtomicGeneratedAnswer = __webpack_exports__.AtomicGeneratedAnswer;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "AtomicGeneratedAnswer"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
