import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import { createContext, useContext } from "react";
import { InsightWidgetDescriptionTrigger } from "./InsightWidgetDescriptionTrigger.js";
const InsightWidgetDescriptionComponentContext = createContext(undefined);
export function InsightWidgetDescriptionComponentProvider({ InsightWidgetDescriptionComponent, children, }) {
    return (_jsx(InsightWidgetDescriptionComponentContext.Provider, { value: { InsightWidgetDescriptionComponent }, children: children }));
}
export const useInsightWidgetDescriptionComponent = () => {
    const context = useContext(InsightWidgetDescriptionComponentContext);
    if (!context) {
        return { InsightWidgetDescriptionComponent: InsightWidgetDescriptionTrigger };
    }
    return context;
};
