import React, { createContext, useContext } from 'react'; interface ListViewContextType { /* FilterSidebar props */ sidebarOpen?: boolean; setSidebarOpen?: (open: boolean) => void; /* ListTabsToolbar props */ currentTabKey?: string; setCurrentTabKey?: (key: string) => void; } const ListViewContext = createContext({ sidebarOpen: false, setSidebarOpen: () => {}, currentTabKey: '', setCurrentTabKey: () => {} }); function ListViewProvider(props: { children: React.ReactNode }) { const [sidebarOpen, setSidebarOpen] = React.useState(false); const [currentTabKey, setCurrentTabKey] = React.useState(''); return ( {props.children} ); } function useListViewContext() { return useContext(ListViewContext); } export { ListViewProvider, useListViewContext };