import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactElement, ReactNode } from 'react'; interface Tab { name: TabName; Component: () => ReactElement; CustomHeader?: () => ReactElement; TabIcon: () => ReactElement; } interface OnCallbackSet { id: string; unsubscribe: () => void; } interface Callback { id: string; callback: T; } /** Function signature for when active tab changes */ type OnActiveTabChangedCallback = (to: TabName, from: TabName | undefined, controller: TController) => void; /** Function signature for when sidesheet opens or closes */ type OnSidesheetOpenOrClosedCallback = (isOpen: boolean, controller: TController) => void; /** Function signature for when filter opens or closes */ type OnFilterOpenOrClosedCallback = (isOpen: boolean, controller: TController) => void; /** Function signature for when isLoading changes */ type OnIsLoadingChangedCallback = (isLoading: boolean, controller: TController) => void; /** Function signature for when sidesheet width changes */ type OnWidthChange = (newWidth: number) => void; type Provider = { name: string; Component: React.FC<{ children: ReactNode; }>; }; type WorkspaceEvents = { onTabChange?: (newTab: string, tabs: Tab[]) => void; }; interface WorkspaceProps { defaultTab?: string; tabs: Tab[]; Sidesheet?: () => ReactElement; providers: Provider[]; events?: WorkspaceEvents; } type TabController$1 = { activeTab: string; setActiveTab: (name: string) => void; }; declare function Workspace({ tabs, defaultTab, Sidesheet, providers, events }: WorkspaceProps): react_jsx_runtime.JSX.Element; type OnchangeCallback = (newValue: TValue, oldValue?: TValue) => void; declare class StateController { isLoading: boolean | undefined; setIsLoading: (value: boolean) => void; onIsLoadingChanged: (callback: OnchangeCallback) => () => void; constructor(); } declare class TabController { activeTab: TabNames | undefined; setActiveTab: (value: TabNames) => void; onActiveTabChanged: (callback: OnchangeCallback) => () => void; tabs: Tab[]; addTab(tab: Tab): this; constructor(); } declare class WorkspaceViewController { appKey?: string; appColor?: string; viewState: StateController; tabController: TabController; providers: Provider[]; Sidesheet: (() => ReactElement) | undefined; addProvider: (provider: Provider) => void; addSidesheetComponent: (comp: () => ReactElement) => void; constructor(defaultTab?: TTabNames); error?: TError; setError: (value: TError | undefined) => void; onError: (callback: OnchangeCallback) => () => void; /** Component for handling errors */ ErrorComponent?: (error: ErrorProps) => ReactElement; /** Function for refetching data */ refetchData?: () => Promise | null; destroy: () => void; } type ErrorProps = { error: TError; }; declare const useTabContext: (selector: (s: TabController$1) => U) => U; declare const useTabs: () => Tab[]; declare const useSetActiveTab: () => (name: string) => void; declare const useActiveTab: () => Tab | undefined; export { type Callback, type OnActiveTabChangedCallback, type OnCallbackSet, type OnFilterOpenOrClosedCallback, type OnIsLoadingChangedCallback, type OnSidesheetOpenOrClosedCallback, type OnWidthChange, type Provider, type Tab, Workspace, WorkspaceViewController, useActiveTab, useSetActiveTab, useTabContext, useTabs };