export type User = { nickname: string; avatar_url: string | null };

export type Comment = {
  cid: string;
  text: string;
  digg_count: number;
  created_at: string | Date;
  user: User;
};

export type VideoData = {
  type: "video";
  aweme_id: string;
  desc: string;
  created_at: string | Date;
  duration_ms?: number | null;
  video_url: string;
  width?: number | null;
  height?: number | null;
  author: User;
  comments: Comment[];
};

export type ImageData = {
  type: "image";
  aweme_id: string;
  desc: string;
  created_at: string | Date;
  images: { id: string; url: string; width?: number; height?: number, animated?: string }[];
  music_url?: string | null;
  author: User;
  comments: Comment[];
};

export type AwemeData = VideoData | ImageData;

export type Neighbors = {
  prev: { aweme_id: string } | null;
  next: { aweme_id: string } | null;
};

export type LoopMode = "loop" | "sequential";
export type ObjectFit = "contain" | "cover";
