"use client";

import { motion } from "framer-motion";
import { useEffect, useState } from "react";
import NewsArticleList from "@/components/main/news-article-list";
import { ARTICLE_TYPE } from "@/constants/article-content-types";

export default function NewsArticleVideoPage() {
  const [mounted, setMounted] = useState(false);
  useEffect(() => setMounted(true), []);
  if (!mounted) {
    return (
      <div className="h-full flex items-center justify-center">
        <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500" />
      </div>
    );
  }
  return (
    <motion.div
      className="h-full overflow-auto bg-gradient-to-br from-slate-50/50 via-white to-slate-50/50"
      initial={{ opacity: 0 }}
      animate={{ opacity: 1 }}
    >
      <div className="p-6">
        <NewsArticleList kind="video" typeId={ARTICLE_TYPE.VIDEO} />
      </div>
    </motion.div>
  );
}
