import type { SelectionStage } from '../components/platform-entry/platformEntryActiveTypes'; import { setHostAppTitle } from './host-bridge/hostBridge'; const APP_TITLE_BRAND = '陶泥儿'; export const APP_HOME_TITLE = '陶泥儿 Genarrative|美术编辑器与项目工作台'; const APP_TITLE_BY_SELECTION_STAGE: Record = { platform: APP_HOME_TITLE, 'creation-home': APP_HOME_TITLE, project: '项目 - 陶泥儿', profile: '我的 - 陶泥儿', 'image-editor': '美术编辑器 - 陶泥儿', }; export function resolveAppTitleForSelectionStage(stage: SelectionStage) { return APP_TITLE_BY_SELECTION_STAGE[stage]; } export function syncAppTitle(title: string) { const normalizedTitle = title.trim() || APP_TITLE_BRAND; if (typeof document !== 'undefined') { document.title = normalizedTitle; } void setHostAppTitle({ title: normalizedTitle }); }