"use client"

import { useLocale } from "@/lib/i18n/context"
import { NewThreadForm } from "@/components/forum/new-thread-form"
import { Button } from "@/components/ui/button"
import Link from "next/link"
import { ArrowLeft } from "lucide-react"

export default function NewThreadPage() {
  const { t } = useLocale()

  return (
    <div className="mx-auto max-w-2xl flex flex-col gap-6">
      <Link href="/" className="self-start">
        <Button variant="ghost" size="sm" className="gap-1.5 text-muted-foreground">
          <ArrowLeft className="h-4 w-4" />
          {t.common.back}
        </Button>
      </Link>

      <div className="rounded-lg border border-border bg-card p-6">
        <h1 className="mb-6 text-xl font-bold text-foreground">{t.thread.create}</h1>
        <NewThreadForm />
      </div>
    </div>
  )
}
