import React, { useState } from 'react'
import { Link, usePage } from '@inertiajs/react'
const navItems = [
{ label: 'Profile', href: '/dashboard/profile', icon: 'fa-solid fa-user' },
// Future: { label: 'Notifications', href: '/dashboard/notifications', icon: 'fa-solid fa-bell' },
// Future: { label: 'Privacy', href: '/dashboard/privacy', icon: 'fa-solid fa-shield-halved' },
]
function NavLink({ item, active, onClick }) {
return (
{item.label}
)
}
function SidebarContent({ isActive, onNavigate }) {
return (
<>
Settings
Creator Studio
>
)
}
function SectionSidebar({ sections = [], activeSection, onSectionChange }) {
return (
<>
Settings
>
)
}
export default function SettingsLayout({ children, title, sections = null, activeSection = null, onSectionChange = null }) {
const { url } = usePage()
const [mobileOpen, setMobileOpen] = useState(false)
const hasSectionMode = Array.isArray(sections) && sections.length > 0 && typeof onSectionChange === 'function'
const isActive = (href) => url.startsWith(href)
const currentSection = hasSectionMode
? sections.find((section) => section.key === activeSection)
: null
return (
{/* Mobile top bar */}
{hasSectionMode ? (
) : (
Settings
)}
{/* Mobile nav overlay (legacy mode only) */}
{!hasSectionMode && mobileOpen && (
setMobileOpen(false)}>
)}
{/* Desktop sidebar */}
{/* Main content */}
{title && (
{title}
{currentSection?.description ? (
{currentSection.description}
) : null}
)}
{children}
)
}