'use client' import React from 'react' import { useSDK } from '@/lib/sdk' import { SDKSidebar } from '../Sidebar' import { CommandBar } from '../CommandBar' import { SDKPipelineSidebar } from '../SDKPipelineSidebar' // ============================================================================= // SDK HEADER // ============================================================================= function SDKHeader() { const { currentStep, setCommandBarOpen, completionPercentage } = useSDK() return (
{/* Breadcrumb / Current Step */}
{/* Actions */}
{/* Command Bar Trigger */} {/* Progress Indicator */}
{completionPercentage}%
{/* Help Button */}
) } // ============================================================================= // NAVIGATION FOOTER // ============================================================================= function NavigationFooter() { const { goToNextStep, goToPreviousStep, canGoNext, canGoPrevious, currentStep, validateCheckpoint } = useSDK() const [isValidating, setIsValidating] = React.useState(false) const handleNext = async () => { if (!currentStep) return setIsValidating(true) try { const status = await validateCheckpoint(currentStep.checkpointId) if (status.passed) { goToNextStep() } else { // Show error notification (in production, use toast) console.error('Checkpoint validation failed:', status.errors) } } finally { setIsValidating(false) } } return ( ) } // ============================================================================= // MAIN LAYOUT // ============================================================================= interface SDKLayoutProps { children: React.ReactNode showNavigation?: boolean } export function SDKLayout({ children, showNavigation = true }: SDKLayoutProps) { const { isCommandBarOpen, setCommandBarOpen } = useSDK() return (
{/* Sidebar */} {/* Main Content */}
{/* Header */} {/* Page Content */}
{children}
{/* Navigation Footer */} {showNavigation && }
{/* Command Bar Modal */} {isCommandBarOpen && setCommandBarOpen(false)} />} {/* Pipeline Sidebar (FAB on mobile, fixed on desktop) */}
) }