import { verifySession } from "@/core/security/session";
import { redirect } from "@/i18n/routing";
import { getLocale } from "next-intl/server";
import { ExperienceForm } from "@/features/experience/experience-form";

export default async function CreateExperiencePage() {
  const session = await verifySession();
  const locale = await getLocale();
  if (!session) redirect({ href: "/admin/login", locale });

  return (
    <div className="min-h-screen bg-muted/10 p-6 lg:p-12">
      <ExperienceForm />
    </div>
  );
}
