/**
 * What this installation shows, part by part.
 *
 * `enabled` is the answer the server acts on: a part that is off has no route,
 * no navigation entry and no place in the search. The browser reads it to
 * avoid rendering a link that would only answer 404, never to decide whether
 * something is allowed.
 */
export type ReleasePart = {
    key: string;
    label: string;
    description: string;
    group: string;
    /** What the rest of the system asks: Full release already applied. */
    enabled: boolean;
    /**
     * The part's own switch, which is what the screen edits. It stays as it was
     * while Full release is on, so turning that off restores the gradual
     * arrangement instead of leaving everything visible.
     */
    chosen: boolean;
};

export type ReleaseState = {
    /** True once the gradual release is finished: every part is visible. */
    full: boolean;
    parts: Record<string, ReleasePart>;
    progress: { enabled: number; total: number };
};

/**
 * The version at the foot of the sidebar, read from VERSION.
 */
export type AppVersion = {
    number: string;
    label: string;
};

/**
 * One entry in docs/releases.md, as Settings -> Release shows the newest few.
 */
export type ReleaseHistoryEntry = {
    version: string;
    date: string;
    body: string;
};
