import type { CollapseProps } from '@mui/material'; import type { Dispatch, ReactNode, SetStateAction } from 'react'; export type View = string; export type Views = View[]; export type OnChangeViews = Dispatch>; export type ViewPlacement = 'left' | 'right'; interface AnchorHandlers { registerAnchor: (key: string, anchor: HTMLElement | null) => void; getAnchor: (key: string) => HTMLElement | null; } /** * This interface will allow the handles of the views and the way the view are compared */ interface ViewHandlers { views: Views; onChangeViews: OnChangeViews; matchView?: (currentViews: Views, viewToMatch: View) => boolean; } export interface ViewsApi { views: Views; toggleView: (view: View) => void; setViews: (...views: Views) => void; isActive: (view: View) => boolean; } export interface ToolbarContext extends AnchorHandlers, ViewsApi { } export interface ToolbarProps extends ViewHandlers { children?: ReactNode; } type Prettify = { [K in keyof T]: T[K]; } & {}; export interface ToolbarViewProps { view: View; children?: ReactNode; animate?: boolean; collapseProps?: Prettify>; testId?: string; anchorId?: string; } export {}; //# sourceMappingURL=types.d.ts.map