/**
* — re-opens the onboarding panel after it's been dismissed.
*
* Only renders when the user has dismissed the panel but still has incomplete
* required steps. Clicking clears the dismissal flag so the panel reappears.
*/
import { IconChecklist } from "@tabler/icons-react";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "../components/ui/tooltip.js";
import { useDevMode } from "../use-dev-mode.js";
import { useOnboarding } from "./use-onboarding.js";
const DEV_ONLY_STEP_IDS = new Set(["database", "auth"]);
export function SetupButton({ className }: { className?: string }) {
const { dismissed, loading, steps, reopen } = useOnboarding();
const { isDevMode } = useDevMode();
const visibleSteps = isDevMode
? steps
: steps.filter((s) => !DEV_ONLY_STEP_IDS.has(s.id));
const totalCount = visibleSteps.length;
const allComplete = visibleSteps
.filter((s) => s.required)
.every((s) => s.complete);
if (loading || totalCount === 0) return null;
if (!dismissed) return null;
if (allComplete) return null;
return (
Re-open setup
);
}