"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderPopup = renderPopup;
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const GptDialog_1 = require("../GptDialog/GptDialog.js");
const constants_1 = require("../constants.js");
const view_1 = require("../gptExtension/view.js");
function renderPopup(anchor, props) {
    return ((0, jsx_runtime_1.jsx)(uikit_1.Popup, { className: (0, view_1.cnGptPopup)(), open: true, strategy: "absolute", onOpenChange: (open) => {
            if (!open)
                props.onClose();
        }, anchorElement: anchor, placement: constants_1.gptPopupPlacement, children: (0, jsx_runtime_1.jsx)("div", { className: (0, view_1.cnGptPopup)('content'), children: (0, jsx_runtime_1.jsx)(GptDialog_1.GptDialog, { markup: props.markup, answerRender: props.answerRender, promptPresets: props.promptPresets, disablePromptPresets: props.disablePromptPresets, customPromptPlaceholder: props.customPromptPlaceholder, disabledPromptPlaceholder: props.disabledPromptPlaceholder, onApplyResult: props.onApplyResult, onCustomPromptApply: props.onCustomPromptApply, onPromptPresetClick: props.onPromptPresetClick, onTryAgain: props.onTryAgain, onLike: props.onLike, onDislike: props.onDislike, onClose: props.onClose, onUpdate: props.onUpdate, gptAlertProps: props.gptAlertProps }) }) }));
}
//# sourceMappingURL=popup.js.map
