export interface HelpSection { id: string label: string items: HelpItem[] } export interface HelpItem { id: string label: string path?: string content?: string relatedPath?: string } export interface SearchableItem { id: string label: string path?: string type: 'navigate' | 'learn' | 'action' section: string content?: string relatedPath?: string } export const helpTree: HelpSection[] = [ { id: 'navigate', label: 'Navigate', items: [ { id: 'home', label: 'Home', path: '/dashboard' }, { id: 'apps', label: 'My Apps', path: '/dashboard/apps' }, { id: 'marketplace', label: 'App Store', path: '/dashboard/marketplace' }, { id: 'cloud', label: 'Cloud', path: '/dashboard/cloud' }, { id: 'server', label: 'Network', path: '/dashboard/server' }, { id: 'web5', label: 'Web5', path: '/dashboard/web5' }, { id: 'settings', label: 'Settings', path: '/dashboard/settings' }, ], }, { id: 'learn', label: 'Learn', items: [ { id: 'bitcoin-basics', label: 'Bitcoin Basics', content: 'Bitcoin is a decentralized digital currency. Your node validates transactions and maintains the blockchain locally.', relatedPath: '/dashboard/server', }, { id: 'lightning-network', label: 'Lightning Network', content: 'Lightning enables instant, low-fee payments. Open channels with other nodes to send and receive payments off-chain.', relatedPath: '/dashboard/apps', }, { id: 'self-hosting', label: 'Self-Hosting', content: 'Archipelago runs your services locally. Your data stays on your hardware, giving you full control and privacy.', relatedPath: '/dashboard', }, ], }, { id: 'actions', label: 'Actions', items: [ { id: 'install-app', label: 'Install an App', path: '/dashboard/marketplace' }, { id: 'manage-apps', label: 'Manage My Apps', path: '/dashboard/apps' }, { id: 'network-settings', label: 'Network Settings', path: '/dashboard/server' }, { id: 'backup', label: 'Backup & Recovery', path: '/dashboard/settings' }, ], }, ] export function flattenForSearch(): SearchableItem[] { const result: SearchableItem[] = [] for (const section of helpTree) { const type = section.id === 'navigate' ? 'navigate' : section.id === 'learn' ? 'learn' : 'action' for (const item of section.items) { result.push({ id: item.id, label: item.label, path: item.path, type, section: section.label, content: item.content, relatedPath: item.relatedPath, }) } } return result }