import type { ReactNode, SyntheticEvent } from 'react' import type { SxProps, Theme } from '@mui/material' import type { BaseWidgetState } from '../stores/types' export interface WrapperProps extends Pick< WrapperUIProps, 'sx' | 'actions' | 'options' | 'labels' | 'children' | 'onChangeCollapsed' >, Pick { id: WrapperState['id'] defaultCollapsed?: boolean } export type WrapperState = BaseWidgetState< T & { title: string disabled?: boolean collapsed?: boolean isLoading?: boolean } > export interface WrapperUIProps extends WrapperActionsProps, Omit { id: WrapperState['id'] children: ReactNode sx?: SxProps labels?: { options?: WrapperOptionsProps['labels'] } onChangeCollapsed?: ( event: SyntheticEvent, collapsed: boolean, ) => void } export interface WrapperActionsProps { actions?: ReactNode[] } export interface WrapperOptionsProps { labels?: { title: string } options?: WrapperOption[] } export interface WrapperOption { label: string disabled?: boolean icon?: ReactNode onClick: () => void }