import { createContext } from 'react'; import { RecoilScopeContext } from '@/types/RecoilScopeContext'; import { View } from '../types/View'; export const ViewBarContext = createContext<{ canPersistViewFields?: boolean; defaultViewName?: string; onCurrentViewSubmit?: () => void | Promise; onViewBarReset?: () => void; onViewCreate?: (view: View) => void | Promise; onViewEdit?: (view: View) => void | Promise; onViewRemove?: (viewId: string) => void | Promise; onViewSelect?: (viewId: string) => void | Promise; onImport?: () => void | Promise; ViewBarRecoilScopeContext: RecoilScopeContext; }>({ ViewBarRecoilScopeContext: createContext(null), });