import { EFFORT_LIST, type Effort } from "../../shared/effort.ts"; import type { Status } from "../state/useProgress.ts"; const STATUSES: Array<{ id: Status | undefined; label: string }> = [ { id: undefined, label: "Not started" }, { id: "doing", label: "Doing it" }, { id: "done", label: "Done" }, ]; /** * Where the reader is with an event, and how much work they reckon it is. * * Both are optional and both are theirs — nothing is inferred on their behalf. * An event with no effort recorded never gets a "you won't finish this" * warning, because we would be inventing the estimate the warning rests on. */ export function ProgressControls({ status, effort, note, onStatus, onEffort, onNote, }: { status: Status | undefined; effort: Effort | undefined; note: string; onStatus: (s: Status | undefined) => void; onEffort: (e: Effort | undefined) => void; onNote: (n: string) => void; }) { return (

Where are you with it?

{STATUSES.map((s) => { const on = status === s.id; return ( ); })}

How much work is it?

{EFFORT_LIST.map((e) => { const on = effort === e.id; return ( ); })}