'use client' import { useState, useEffect } from 'react' import { PagePurpose } from '@/components/common/PagePurpose' import { getModuleByHref } from '@/lib/navigation' import { ExternalLink, Maximize2, Minimize2, RefreshCw, Search, BookOpen, ArrowRight } from 'lucide-react' // Quick links to important documentation sections const quickLinks = [ { name: 'Architektur', path: '#architektur', icon: '🏗️' }, { name: 'Klausur-Service', path: 'services/klausur-service/', icon: '📝' }, { name: 'AI-Compliance-SDK', path: 'services/ai-compliance-sdk/', icon: '🔒' }, { name: 'Voice-Service', path: 'services/voice-service/', icon: '🎤' }, { name: 'Agent-Core', path: 'services/agent-core/', icon: '🤖' }, { name: 'CI/CD Pipeline', path: 'development/ci-cd-pipeline/', icon: '🚀' }, ] export default function DocsPage() { const [isFullscreen, setIsFullscreen] = useState(false) const [isLoading, setIsLoading] = useState(true) const [currentPath, setCurrentPath] = useState('') const moduleInfo = getModuleByHref('/development/docs') // Determine docs URL based on environment // Use same-origin proxy at /docs/ to avoid mixed content issues (HTTPS -> HTTP) const getDocsUrl = () => { if (typeof window !== 'undefined') { // Use same-origin proxy path to avoid mixed content issues const protocol = window.location.protocol const hostname = window.location.hostname const port = window.location.port return `${protocol}//${hostname}${port ? ':' + port : ''}/docs` } return '/docs' } const docsUrl = getDocsUrl() const handleIframeLoad = () => { setIsLoading(false) } const navigateTo = (path: string) => { setCurrentPath(path) setIsLoading(true) } const toggleFullscreen = () => { setIsFullscreen(!isFullscreen) } const openInNewTab = () => { window.open(`${docsUrl}/${currentPath}`, '_blank') } const refreshDocs = () => { setIsLoading(true) // Force iframe reload by toggling key setCurrentPath(currentPath + '?refresh=' + Date.now()) setTimeout(() => setCurrentPath(currentPath), 100) } if (isFullscreen) { return (
{/* Fullscreen Toolbar */}
Breakpilot Dokumentation