import { SearchHistory } from "./SearchHistory.js";
import { SuggestWords } from "./SuggestWords.js";
import { HotWords } from "./HotWords.js";
import React from "react";
//#region src/components/pisellLookup/components/LookupAuxiliary.tsx
/**
* LookupAuxiliary 组件
* 辅助信息层：搜索历史、联想词、热门搜索
*/
const LookupAuxiliary = (props) => {
	const { keyword, showHistory, history = [], showSuggestions, suggestions = [], showHotWords, hotWords = [], onSelect, onRemoveHistory, onClearHistory, historyRender, suggestionsRender, hotWordsRender, className, style } = props;
	const hasHistory = showHistory && history.length > 0;
	const hasSuggestions = showSuggestions && suggestions.length > 0 && keyword;
	const hasHotWords = showHotWords && hotWords.length > 0 && !keyword;
	if (!(hasHistory || hasSuggestions || hasHotWords)) return null;
	return /* @__PURE__ */ React.createElement("div", {
		className: `pisell-lookup-auxiliary ${className || ""}`,
		style
	}, hasHistory && /* @__PURE__ */ React.createElement(SearchHistory, {
		history,
		onSelect,
		onRemove: onRemoveHistory,
		onClear: onClearHistory,
		render: historyRender
	}), hasSuggestions && /* @__PURE__ */ React.createElement(SuggestWords, {
		suggestions,
		onSelect,
		render: suggestionsRender
	}), hasHotWords && /* @__PURE__ */ React.createElement(HotWords, {
		hotWords,
		onSelect,
		render: hotWordsRender
	}));
};
LookupAuxiliary.displayName = "LookupAuxiliary";
//#endregion
export { LookupAuxiliary };
