import { __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { Popup } from '@gravity-ui/uikit';
import { HistoryList } from "./HistoryList.js";
/**
 * History component - wraps HistoryList in a Popup
 *
 * @param props - Component props
 * @returns React component
 */
export function History(props) {
    const { open = false, onOpenChange, anchorElement } = props, listProps = __rest(props, ["open", "onOpenChange", "anchorElement"]);
    const handleChatClick = () => {
        onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
    };
    return (_jsx(Popup, { anchorElement: anchorElement, placement: "bottom-end", open: open, onOpenChange: onOpenChange, children: _jsx(HistoryList, Object.assign({}, listProps, { onChatClick: handleChatClick })) }));
}
//# sourceMappingURL=History.js.map
