'use client'

export default function CollegesError({
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <main className="min-h-screen bg-background flex items-center justify-center px-4">
      <section className="w-full max-w-2xl rounded-2xl border border-border bg-card p-8 text-center space-y-5">
        <h1 className="text-3xl font-bold">تعذر تحميل صفحة الكليات</h1>
        <p className="text-muted-foreground leading-7">
          حدث خطأ مؤقت أثناء تحميل البيانات. يمكنك إعادة المحاولة الآن.
        </p>
        <div className="flex justify-center gap-3 flex-wrap">
          <button
            onClick={reset}
            className="h-11 px-6 rounded-xl bg-primary text-primary-foreground font-bold"
          >
            إعادة المحاولة
          </button>
          <button
            onClick={() => window.location.assign('/')}
            className="h-11 px-6 rounded-xl border border-border bg-background font-bold"
          >
            العودة للرئيسية
          </button>
        </div>
      </section>
    </main>
  )
}

