import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import { memo } from "react";
import { typedUiMenuContextStore } from "../context.js";
export const Item = memo(function Item({ item }) {
    const { InteractiveItemWrapper, StaticItem, GroupItem, ContentItemWrapper } = typedUiMenuContextStore().useContextStoreValues([
        "InteractiveItemWrapper",
        "StaticItem",
        "GroupItem",
        "ContentItemWrapper",
    ]);
    if (item.type === "interactive") {
        return _jsx(InteractiveItemWrapper, { item: item });
    }
    if (item.type === "static") {
        return _jsx(StaticItem, { item: item });
    }
    if (item.type === "group") {
        return _jsx(GroupItem, { item: item });
    }
    if (item.type === "content") {
        return _jsx(ContentItemWrapper, { item: item });
    }
    return null;
});
