import { useState } from 'react';
import { Link } from 'react-router-dom';
import PageHeader from '@/components/workshop/PageHeader';
import BoundaryNotice from '@/components/workshop/BoundaryNotice';
import NewCoverWizard from '@/components/newcover/NewCoverWizard';
export default function NewCover() { const [created,setCreated]=useState(null); return <><PageHeader eyebrow="Ten-step controlled intake" title="New Cover" description="Create a revisioned workshop project from customer, limb, components, measurements and design constraints."/><BoundaryNotice/>{created?<div className="panel mx-auto mt-6 max-w-2xl p-8 text-center"><p className="text-sm text-violet-400">PROJECT CREATED</p><h2 className="mt-2 text-3xl font-semibold text-white">{created.project_id}</h2><p className="mt-3 text-slate-400">Revision {created.revision} · {created.status}</p><div className="mt-6 flex justify-center gap-3"><Link className="btn-primary" to="/projects">Open projects</Link><button className="btn-secondary" onClick={()=>setCreated(null)}>Create another</button></div></div>:<div className="mt-6"><NewCoverWizard onCreated={setCreated}/></div>}</> }