import type { CSSProperties } from "react"; import EyeIcon from "@/assets/icons/eye.svg?react"; import { formatCompactNumber } from "@/utils/formatNumber"; export type TopVideoCardProps = { title: string; views: number; uploadedAgo: string; type: "Short" | "Long"; duration?: string; className?: string; style?: CSSProperties; }; export function TopVideoCard({ title, views, uploadedAgo, type, duration, className = "", style, }: TopVideoCardProps) { const typeClass = type === "Short" ? "bg-lavender-100 text-violet-700" : "bg-[var(--color-status-info-bg)] text-[var(--color-status-info-text)]"; return (
{type} {duration ? {duration} : null} {uploadedAgo}

{title}

{formatCompactNumber(views)} views
); }