"use client"; import Link from "next/link"; import { SegmentedPill } from "@/components/SegmentedPill"; import { useI18n } from "@/lib/i18n"; import { useIsPhone } from "@/lib/use-phone"; import { useWizardBusy } from "@/lib/wizard-busy"; import { cn } from "@/lib/utils"; /** * In-page switch between the three note-powered wizards (New deck ⇄ Make my * homework ⇄ New podcast). Phones reach the first two through this control and * the centre tab; desktop keeps the rail rows as well. Hidden while a wizard * is generating: leaving a loading run through it would abandon the request * mid-flight. */ export function WizardModeSwitch({ mode }: { mode: "deck" | "homework" | "podcast" }) { const { t } = useI18n(); const isPhone = useIsPhone(); const busy = useWizardBusy(); if (busy) return null; return (
{isPhone && mode === "deck" ? : null} {t("wizard.mode.deck")} {isPhone && mode === "homework" ? : null} {t("wizard.mode.homework")} {isPhone && mode === "podcast" ? : null} {t("wizard.mode.podcast")}
); }