export interface RichBaseBlock {
  type: string;
  value: string;
}

export interface RichTextBlock extends RichBaseBlock {
  param?: {
    underline?: boolean;
    bold?: boolean;
    italic?: boolean;
    sup?: boolean;
    sub?: boolean;
  };
}

export interface RichImageBlock extends RichBaseBlock {
  param?: {
    width: number;
    height: number;
    latex?: string;
  };
}
export interface RichAudioBlock extends RichBaseBlock {
  param?: {
    duration: number;
  };
}

export type RichBlock = RichTextBlock | RichImageBlock | RichAudioBlock;

export interface RichSection {
  blocks: RichBlock[];
}

export interface RichTextJSON {
  sections: RichSection[];
}
