"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.History = History;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const HistoryList_1 = require("./HistoryList.js");
/**
 * History component - wraps HistoryList in a Popup
 *
 * @param props - Component props
 * @returns React component
 */
function History(props) {
    const { open = false, onOpenChange, anchorElement } = props, listProps = tslib_1.__rest(props, ["open", "onOpenChange", "anchorElement"]);
    const handleChatClick = () => {
        onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
    };
    return ((0, jsx_runtime_1.jsx)(uikit_1.Popup, { anchorElement: anchorElement, placement: "bottom-end", open: open, onOpenChange: onOpenChange, children: (0, jsx_runtime_1.jsx)(HistoryList_1.HistoryList, Object.assign({}, listProps, { onChatClick: handleChatClick })) }));
}
//# sourceMappingURL=History.js.map
