---
// ReviewDetail — the static review panel for a single submission.
//
// The "detail" article on the review desk. Owns the parts that don't need
// interactivity of their own: the header (status, title, author, version
// switcher surface), the gold "THE JOB" purpose callout, the two-column
// review grid (what's working / highest-value improvements), and the blue
// "GOOD NEXT ADDITION" extras strip.
//
// The interactive siblings — VoteWidget, FileTabs, PreviewPane, ChangeLens
// — live as separate components and are composed by the page (task 16).
// This component is the static wrapper around them.
interface SkillEntry {
id: string;
author: string;
title: string;
status: string;
/** One-sentence summary that fills the gold purpose panel. */
focus: string;
/** "WHAT'S ALREADY WORKING" bullets. */
wins: string[];
/** "HIGHEST-VALUE IMPROVEMENTS" bullets. */
improve: string[];
/** "GOOD NEXT ADDITION" copy. */
extras: string;
}
interface Props {
entry: SkillEntry;
/** Which draft is currently being viewed. Drives the version switcher's
* initial state and the share-link copy. */
preview: 'original' | 'improved';
}
const { entry, preview } = Astro.props;
const shareHref = `?author=${encodeURIComponent(entry.author)}&skill=${encodeURIComponent(entry.id)}&view=${preview}`;
const authorHref = `?author=${encodeURIComponent(entry.author)}`;
---