export type MediaAssetKind = 'image' | 'svg' | 'pdf' | 'other';

export interface MediaAsset {
  id: string;
  url: string;
  thumbnailUrl?: string;
  filename: string;
  mimeType: string;
  size: number;
  width?: number;
  height?: number;
  altText?: Record<string, string>;
  /** Plain (non-localized) caption shown under the asset - matches the existing single-string convention used for page hero captions. */
  caption?: string;
  description?: string;
  /** Marks the asset as intentionally decorative, suppressing the missing-alt-text warning without requiring empty alt text everywhere. */
  decorative?: boolean;
  tags?: string[];
  folder?: string;
  createdAt: string;
}

export type MediaSort = 'recent' | 'name' | 'size';

export interface MediaListParams {
  page?: number;
  pageSize?: number;
  search?: string;
  folder?: string;
  tag?: string;
  kind?: MediaAssetKind;
  sort?: MediaSort;
}

export interface MediaUploadOptions {
  folder?: string;
  tags?: string[];
}

export interface MediaListResult {
  items: MediaAsset[];
  total: number;
}
