import { createFileRoute } from "@tanstack/react-router";
import { Header } from "@/components/site/Header";
import { Footer } from "@/components/site/Footer";
import { SignInModal, CartDrawer, CheckoutFlow } from "@/components/site/Modals";
import { useState } from "react";

export const Route = createFileRoute("/careers")({
  head: () => ({
    meta: [{ title: "Careers — SulejaMarket" }],
  }),
  component: CareersPage,
});

function CareersPage() {
  const [signInOpen, setSignInOpen] = useState(false);
  const [cartOpen, setCartOpen] = useState(false);
  const [checkoutOpen, setCheckoutOpen] = useState(false);

  return (
    <div className="min-h-screen bg-neutral-50 flex flex-col">
      <SignInModal open={signInOpen} onOpenChange={setSignInOpen} />
      <CartDrawer open={cartOpen} onOpenChange={setCartOpen} onCheckout={() => { setCartOpen(false); setCheckoutOpen(true); }} />
      <CheckoutFlow open={checkoutOpen} onOpenChange={setCheckoutOpen} />
      <Header onOpenCart={() => setCartOpen(true)} onOpenSignIn={() => setSignInOpen(true)} />
      
      <main className="flex-1 max-w-[800px] w-full mx-auto px-4 py-12">
        <h1 className="text-3xl font-bold mb-6 text-neutral-900">Careers</h1>
        <div className="bg-white p-8 rounded-lg border prose max-w-none text-neutral-600">
          <p className="mb-4">Join the team building the future of commerce in Africa.</p>
          <p className="mb-4">At SulejaMarket, we are always looking for passionate, innovative, and driven individuals to join our growing team. Whether you are an engineer, designer, marketer, or logistics expert, there is a place for you here.</p>
          <h2 className="text-xl font-semibold mt-6 mb-2 text-neutral-900">Open Roles</h2>
          <ul className="list-disc pl-5 space-y-2">
            <li>Frontend Engineer (React)</li>
            <li>Backend Engineer (Node.js)</li>
            <li>Product Designer</li>
            <li>Vendor Operations Manager</li>
          </ul>
          <p className="mt-6 text-sm">Please send your resume and portfolio to <a href="mailto:careers@sulejamarket.ng" className="text-orange-600 hover:underline">careers@sulejamarket.ng</a>.</p>
        </div>
      </main>
      
      <Footer />
    </div>
  );
}
