export enum HighlightedSpanType {
  Mention = 'user_mention',
  AllMention = 'channel_mention',
}

export type HighlightedSpanBase<T extends HighlightedSpanType> = {
  start: number;
  end: number;
  type: T;
};

export type HighlightedSpanMention =
  HighlightedSpanBase<HighlightedSpanType.Mention> & {
    user_id: number;
    full_name?: string;
  };

export type HighlightedSpanAllMention =
  HighlightedSpanBase<HighlightedSpanType.AllMention>;

export type HighlightedSpan =
  | HighlightedSpanMention
  | HighlightedSpanAllMention;
