import { ArticleModel } from "./models";
import {styled} from "@mui/material/styles";
import Card from "@mui/material/Card";

export interface LatestProps {
  articles: ArticleModel[];
  onSelectArticle?: (index: number) => void;
  onLoadMore?: (offset: number, limit: number) => Promise<void>; // optional async callback
}

export interface ArticleProps {
  article: ArticleModel;
  onBack: () => void;
}

export interface ArticleMetaProps {
  article: ArticleModel;
}

export interface ArticleCardProps {
  article: ArticleModel;
  index: number;
  focusedCardIndex: number | null;
  onSelectArticle: (index: number) => void;
  onFocus: (index: number) => void;
  onBlur: () => void;
}

export interface ArticleGridProps {
  articles: ArticleModel[];
  onSelectArticle: (index: number) => void;
  xs?: number;  // default 12 for mobile full-width
  md6?: number; // default 6 (half-width)
  md4?: number; // default 4 (third-width)
  nested?: 1 | 2; // number of stacked cards in a nested column
}
