import {humanCopy,categories} from '@/lib/human-copy';
import {statusLabel} from '@/lib/public-work';
export function ProblemCard({task:t}:{task:any}){const copy=humanCopy(t);return <article className="problem-card"><h2><a href={'/tasks/'+t.id}>{copy.title}</a></h2><p>{copy.blurb}</p><p className="work-size">~{t.estimated_minutes} min · {categories[t.category]||t.category}{t.status!=='open'?' · '+statusLabel(t):''}</p><a className="card-link tech-button small" href={'/tasks/'+t.id}>View Thread →</a></article>}
export function Evidence({urls}:{urls:string[]}){return <ul className="evidence-list">{urls.map((u,i)=>{let safe=false;try{const p=new URL(u);safe=p.protocol==='https:'&&!p.username&&!p.password}catch{}return <li key={i}>{safe?<a href={u} rel="nofollow noopener noreferrer">{u}</a>:<span>{u} (unsafe link disabled)</span>}</li>})}</ul>}
