import { ChevronRight } from "lucide-react";
import type { CareTeam } from "fhir/r4";
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "../../../../components/ui/dialog";
import { OrgBadge } from "../../../../components/ui/org-badge";
import { Progress } from "../../../../components/ui/progress";
import { Skeleton } from "../../../../components/ui/skeleton";
import type { PlanStep } from "../../../../utils/carePlanSteps";
import type { PlanCard, PlanGoal } from "./carePlanRows";
/**
* ONE PLAN, OPENED OVER THE LIST - the deck's "the plan itself", a dialog on a phone and on a laptop
* alike, with the trail behind it still reading Care plans because an overlay has no trail of its own.
*
* KEYED BY THE PLAN. Everything inside is drawn for exactly one plan id, and moving to another remounts
* it, so nothing drawn for the last plan can stand under the next one's title. A plan asked for by id
* that the list has not delivered yet is still loading; one the answered list does not hold is said to
* be missing, never drawn from whatever was open before.
*
* Its steps are the Tasks based on it; steps that could not be read are never "Nothing is on this plan yet".
*/
export interface PlanStepsRead {
/** The plan's tasks and readings have answered. */
answered: boolean;
failed: boolean;
stepsFor: (planId: string) => PlanStep[];
}
export interface PlanTeamsRead {
answered: boolean;
failed: boolean;
teams: readonly CareTeam[];
}
const GoalRow = ({ goal }: { goal: PlanGoal }) => (