import { LS, setTabRaw } from "./storage"; // The Settings page's tabs, and a helper to pre-select one before navigating there (a notice's link, // a return from Google). useTabPersistedState reads the key when the page mounts, and the page on // screen hears it. Kept out of SettingsPanel.tsx so a caller does not pull the page in with it. The // address-bar key the page mirrors its tab to is here too, beside the other pages' keys. export const SETTINGS_TAB_KEY = "stab"; /** The address-bar delta for the Settings tab shown. */ export function settingsTabParams(tab: string | null): Record { return { [SETTINGS_TAB_KEY]: tab }; } export type SettingsTabId = | "appearance" | "notifications" | "downloads" | "tokens" | "account" | "diagnostics"; export function focusSettingsTab(tab: SettingsTabId): void { setTabRaw(LS.settingsTab, tab); }