import { useState } from "react"; import { useTranslation } from "react-i18next"; import { PanelRight, SquareArrowOutUpRight, X } from "lucide-react"; const STORAGE_KEY = "termix_multiPanelHintDismissed"; function multiPanelHintDismissed(): boolean { return localStorage.getItem(STORAGE_KEY) === "true"; } /** * One-time nudge telling users a panel can leave the sidebar. Both actions are * otherwise only reachable through modifier clicks and the rail context menu, * which nobody finds on their own. */ export function MultiPanelHint({ canPromote, canRightDock, onOpenAsTab, onOpenInRightDock, }: { canPromote: boolean; canRightDock: boolean; onOpenAsTab: () => void; onOpenInRightDock: () => void; }) { const { t } = useTranslation(); const [dismissed, setDismissed] = useState(multiPanelHintDismissed); if (dismissed || (!canPromote && !canRightDock)) return null; function dismiss() { localStorage.setItem(STORAGE_KEY, "true"); setDismissed(true); } return (

{t("nav.multiPanelHintTitle")}

{t("nav.multiPanelHintBody")}

{canPromote && (
{": "} {t("nav.multiPanelHintTabHow")}
)} {canRightDock && (
{": "} {t("nav.multiPanelHintDockHow")}
)}
); }