import { ReactNode, useState } from "react"; import { useNavigate } from "react-router-dom"; import { DEFAULT_NAV_ITEMS } from "./navItems"; import CourseEditorHeader from "./CourseEditorHeader"; import { motion } from "framer-motion"; import { NavItem } from "@nicestack/client" import CourseEditorSidebar from "./CourseEditorSidebar"; interface CourseEditorLayoutProps { children: ReactNode; } export default function CourseEditorLayout({ children }: CourseEditorLayoutProps) { const [isHovered, setIsHovered] = useState(false); const [selectedSection, setSelectedSection] = useState(0); const [navItems, setNavItems] = useState(DEFAULT_NAV_ITEMS); const navigate = useNavigate(); const handleNavigation = (item: NavItem, index: number) => { setSelectedSection(index); navigate(item.path); }; return (

{navItems[selectedSection]?.label}

{children}
); }