import { Metadata } from "next"
import Link from "next/link"
import { ArrowLeft } from "lucide-react"

import { Button } from "@/components/ui/button"
import WorkoutForm from "@/components/workout-form"

export const metadata: Metadata = {
  title: "New Workout | TabataFit Admin",
  description: "Create a new workout",
}

export default function NewWorkoutPage() {
  return (
    <div className="p-8 max-w-4xl mx-auto">
      <div className="mb-8">
        <Button variant="ghost" asChild className="mb-4 text-neutral-400 hover:text-white">
          <Link href="/workouts">
            <ArrowLeft className="mr-2 h-4 w-4" />
            Back to Workouts
          </Link>
        </Button>
        <h1 className="text-3xl font-bold text-white mb-2">Create New Workout</h1>
        <p className="text-neutral-400">
          Fill in the details below to create a new Tabata workout
        </p>
      </div>

      <div className="rounded-lg border border-neutral-800 bg-neutral-900 p-6">
        <WorkoutForm mode="create" />
      </div>
    </div>
  )
}
