import type { TypographyProps } from '@mui/material' import type { ReactNode } from 'react' import type { BaseWidgetState, WidgetsStoreProps } from '../stores/types' import type { WrapperState } from '../wrapper/types' import type { DownloadItem } from '../actions/download/types' export interface FormulaUIProps { id: WidgetsStoreProps['id'] } export interface DataItem { value: number prefix?: string | ReactNode suffix?: string | ReactNode color?: string } export interface RowProps { id: WidgetsStoreProps['id'] children: ReactNode | ((props: { index: number }) => ReactNode) } export interface ValueProps extends Omit { id: WidgetsStoreProps['id'] index?: number } export interface ItemProps { children: ReactNode disabled?: boolean TypographyProps?: TypographyProps } export type FormulaWidgetData = DataItem[] export interface SeriesConfig { name: string color?: string } export type FormulaWidgetState = BaseWidgetState< WrapperState & { data: FormulaWidgetData } > export interface FormulaWidgetConfig { formatter?: (value: number) => string series?: SeriesConfig[] } export type FormulaDownloadConfig = DownloadItem[]