export interface DescriptionsSchema {
  span?: number // 占多少分
  field: string // 字段名
  label?: string // label名
  width?: string | number
  minWidth?: string | number
  align?: 'left' | 'center' | 'right'
  labelAlign?: 'left' | 'center' | 'right'
  className?: string
  labelClassName?: string
  slots?: {
    default?: (...args: any[]) => JSX.Element | null
    label?: (...args: any[]) => JSX.Element | null
  }
}

export interface DescriptionsProps {
  schema: DescriptionsSchema[],
  title?: string,
  message?: string,
  collapse?: boolean,
  border?: boolean,
  column?: number,
  size?: 'large' | 'default' | 'small',
  direction: 'horizontal' | 'vertical',
  extra?: string,
  data: Recordable

}

export type Register = (descInstance: DescInstance) => void

export interface DescInstance {
  setDescProps(descProps: Partial<DescriptionsProps>): void
}

export type UseDescReturnType = [Register, DescInstance]