import * as React from 'react' import {IJaenConnection} from '../../../../types' export type ViewOptions = { path: string displayName: string description: string Icon: React.ComponentType<{}> controls?: React.ReactNode[] } export const ViewContext = React.createContext<{} | undefined>(undefined) export const useNotificationContext = () => { const context = React.useContext(ViewContext) if (context === undefined) { throw new Error( `useNotificationContext must be used within a NotificationProvider` ) } return context } export interface ViewProviderProps extends ViewOptions {} export const ViewProvider: React.FC< React.PropsWithChildren > = ({children}) => { return {children} } export const connectView =

( Component: React.ComponentType

, options: ViewOptions ) => { const MyComp: IJaenConnection = props => { return ( ) } MyComp.options = options return MyComp } export type IViewConnection = ReturnType