import { tr } from '../lib/i18n'; import { GuidedSetup } from '../components/GuidedSetup'; import { useNative } from '../lib/native'; import { useStore } from '../lib/store'; import { useEngineUnpacking } from '../lib/engine-setup'; import { EngineFirstRun, useEngineNeeded } from '../components/EngineFirstRun'; import { useEffect, useState } from 'react'; /** Every setup entry uses the same guided onboarding. */ export function SetupScreen() { const native = useNative(), setup = useStore(s => s.setup); const needsEngine = useEngineNeeded(), [engineStepDone, setEngineStepDone] = useState(false), [cardShown, setCardShown] = useState(false); useEffect(() => { if (needsEngine) setCardShown(true); }, [needsEngine]); const unpacking = useEngineUnpacking(!native || !setup); // No engine on this PC yet: the first-run card comes before the model steps (it works before the native snapshot has connected). if (!engineStepDone && !setup?.complete && (needsEngine || cardShown)) return setEngineStepDone(true)}/>; if (!native || !setup) return

{tr("Getting your setup ready\u2026")}

{unpacking ?

{tr("Unpacking the engine that came with the app. This takes about a minute the first time.")}

: null}
; return ; }