import * as SecureStore from "expo-secure-store";

const KEY = "codexbar_onboarding_v1";

export async function hasCompletedOnboarding(): Promise<boolean> {
  const val = await SecureStore.getItemAsync(KEY);
  return val === "done";
}

export async function markOnboardingComplete(): Promise<void> {
  await SecureStore.setItemAsync(KEY, "done");
}

export async function resetOnboarding(): Promise<void> {
  await SecureStore.deleteItemAsync(KEY);
}
