import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { formatAmount } from "../format.ts"; import { planBalance, setSliceAmount, withPlan, withoutPlan, type PurchaseDraft, } from "../purchaseForm.ts"; import { monthOf } from "../../domain/months.ts"; interface Props { draft: PurchaseDraft; onChange: (next: PurchaseDraft) => void; } export function PlanEditor({ draft, onChange }: Props) { const balance = planBalance(draft); if (!draft.plan) { return ( ); } return (
); }