import { createContext, useContext } from 'react'; import { assertContextValue } from '../createContext'; import { TagsWidgetState } from '@wix/bex-core'; export const tagsWidgetContext = createContext(null); export const TagsWidgetContextProvider = tagsWidgetContext.Provider; export const TagsWidgetContextConsumer = tagsWidgetContext.Consumer; export const useTagsWidgetContext = () => { const value = useContext(tagsWidgetContext); assertContextValue('TagsWidgetProvider', value); return value as TagsWidgetState; };