export interface LostPickActions { /** Clears the chosen time, its end and the flow's time answer; the date stays. */ clearPick: () => void; /** Drops the plan that was reviewed from the lost time. */ forgetPlan: () => void; showRefusal: (message: string) => void; /** A fresh read of the same day's times, so the time just taken is no longer offered. */ rereadTimes: () => void; toTimeChoice: () => void; } // Someone else took the time while it was being reviewed. The patient chooses again from times read after the loss; // the server frees any Slot it reserved for the losing request, so nothing is deleted here. export function returnLostPickToTimeChoice(message: string, actions: LostPickActions): void { actions.clearPick(); actions.forgetPlan(); actions.showRefusal(message); actions.rereadTimes(); actions.toTimeChoice(); }