"use client";
/* The screen you land on when something has gone to your approver.
*
* It exists because the old flow jumped straight to the order, which opens on "Awaiting approval"
* and nothing else: the one question somebody has the second after tapping Send — has anyone
* actually been told? — was answered by a status word that says only that nobody has decided yet.
*
* So the sentence under "What happens next" is computed from what this server can really do
* (`notifyWays()` — a registered phone, a working mail server, or neither), not from what is
* usually true elsewhere. A screen that promises a notification nobody configured is how a request
* sits for three weeks.
*
* No back chevron. Behind this screen is a half-filled form for a request that has already been
* raised, and the one thing worse than losing a draft is sending the same ask twice.
*/
import Link from "next/link";
import { MBar, MBody, MRule, MTop } from "@/components/m";
import { INK, N600 } from "@/components/staffui";
export type SentAction = { label: string; href: string };
export default function Sent({ title = "Sent", headline, sub, next, actions, bar }: {
/** App-bar title. */
title?: string;
/** The 26/900 line: "Sent to" and whoever the approver is. */
headline: string;
/** What was asked for, and the code it was given. */
sub?: string;
/** One line under "What happens next" — never a paragraph. */
next?: string;
/** The outlined buttons, in order. */
actions?: SentAction[];
/** The 64px bar at the foot. */
bar: SentAction;
}) {
return (
<>
{headline}
{sub &&
{sub}
}
{next && (
/* The mockup's `.notice`: a full 2px ink border rather than staffui's accent edge,
which is the linen room's voice and this is not from them. */