/* eslint-disable @typescript-eslint/no-use-before-define */
import { h } from "@stencil/core";
export const renderSuggestLists = (suggestData) => {
    if (suggestData === null || suggestData === void 0 ? void 0 : suggestData.suggestLists.length) {
        return suggestData.suggestLists.map((list) => {
            return (h("ch-suggest-list", { label: list.label }, list.items.map((item) => {
                return renderSuggestListsItem(item);
            })));
        });
    }
    return [];
};
const renderSuggestListsItem = (suggestItem) => {
    return (h("ch-suggest-list-item", { value: suggestItem.value }, [
        suggestItem.description || suggestItem.value,
        suggestItem.icon && renderIcon(suggestItem.icon)
    ]));
};
const renderIcon = (iconName) => {
    return h("gxg-icon", { color: "auto", type: iconName, slot: "icon" });
};
//# sourceMappingURL=render-suggest.js.map
