import { widgetStore } from '../store'; import { useSelectedFieldStore } from './useSelectedFieldStore'; export type UseWidgetInteractionsArg = { widgetId: string; }; export function useWidgetInteractions({ widgetId }: UseWidgetInteractionsArg) { const widgetInteractions = useSelectedFieldStore( widgetStore, () => widgetStore.get()[widgetId]?.widgetInteractions ); return widgetInteractions; }