import { jsx as _jsx } from "react/jsx-runtime";
import { Popup } from '@gravity-ui/uikit';
import { GptDialog } from "../GptDialog/GptDialog.js";
import { gptPopupPlacement } from "../constants.js";
import { cnGptPopup } from "../gptExtension/view.js";
export function renderPopup(anchor, props) {
    return (_jsx(Popup, { className: cnGptPopup(), open: true, strategy: "absolute", onOpenChange: (open) => {
            if (!open)
                props.onClose();
        }, anchorElement: anchor, placement: gptPopupPlacement, children: _jsx("div", { className: cnGptPopup('content'), children: _jsx(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
