"use client"

import Link from "next/link"
import { Calendar, FilePlus, MessageSquare, Settings } from "lucide-react"
import { useTranslations } from "next-intl"

import { Button } from "@/shared/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card"

interface ClassQuickActionsProps {
  classId: string
}

export function ClassQuickActions({ classId }: ClassQuickActionsProps) {
  const t = useTranslations("classes")
  return (
    <Card>
      <CardHeader>
        <CardTitle className="text-base font-semibold">{t("detail.widgets.quickActions")}</CardTitle>
      </CardHeader>
      <CardContent className="grid gap-2">
        <Button asChild className="w-full justify-start" size="sm">
          <Link href={`/teacher/homework/assignments/create?classId=${encodeURIComponent(classId)}`}>
            <FilePlus className="mr-2 h-4 w-4" />
            {t("detail.assignments.createHomework")}
          </Link>
        </Button>
        <Button asChild variant="outline" className="w-full justify-start" size="sm">
          <Link href={`/teacher/classes/schedule?classId=${encodeURIComponent(classId)}`}>
            <Calendar className="mr-2 h-4 w-4" />
            {t("detail.quickActions.manageSchedule")}
          </Link>
        </Button>
        <Button variant="outline" className="w-full justify-start" size="sm" disabled>
          <MessageSquare className="mr-2 h-4 w-4" />
          {t("detail.quickActions.messageClassComingSoon")}
        </Button>
        <Button variant="outline" className="w-full justify-start" size="sm" disabled>
          <Settings className="mr-2 h-4 w-4" />
          {t("detail.header.classSettings")}
        </Button>
      </CardContent>
    </Card>
  )
}
