/** A media library item as sent to Client Components. */
export type MediaItem = {
  id: string;
  /** URL to use in content. Root-relative ("/uploads/…") for local storage. */
  url: string;
  /** Absolute URL, for copying and for the website. */
  publicUrl: string;
  filename: string;
  mimeType: string;
  size: number;
  width: number | null;
  height: number | null;
  altText: string;
  title: string | null;
  createdAt: string;
  uploadedBy: string | null;
};

export type MediaListResponse = {
  items: MediaItem[];
  total: number;
  page: number;
  pageSize: number;
};

/** An image chosen for a field: featured image, author photo, OG image, CTA image. */
export type ImageValue = {
  url: string;
  alt: string;
  title: string;
};
