/** * The billing gate as a decision. A lapsed practice reverts to the free plan and keeps the core, so no * billing state replaces the app; only an unknown answer waits. Kept out of App.tsx so it can be tested. */ export type BillingGateDecision = /** the answer is not known yet - say nothing rather than guess */ | 'loading' /** render the app */ | 'app'; export interface BillingGateQuestion { isLoading: boolean; } export const billingGateDecision = ({ isLoading }: BillingGateQuestion): BillingGateDecision => (isLoading ? 'loading' : 'app');