const IconGeneral = ({ className }) => ( ); const IconDisplay = ({ className }) => ( ); const IconGallery = ({ className }) => ( ); const IconImage = ({ className }) => ( ); const IconExportImport = ({ className }) => ( ); const IconSupport = ({ className }) => ( ); const ICON_MAP = { general: IconGeneral, "display-settings": IconDisplay, "image-sources": IconGallery, "image-sizes": IconImage, "export-import": IconExportImport, support: IconSupport, }; const GROUPS = [ { label: "GENERAL SETTINGS", items: [ { id: "general", label: "General" }, { id: "display-settings", label: "Display Settings" }, { id: "image-sources", label: "Image sources" }, { id: "image-sizes", label: "Image Sizes" }, { id: "export-import", label: "Export & Import" }, ], }, { label: "SUPPORT", items: [ { id: "support", label: "Help & Support" }, ], }, ]; export default function SidebarNav({ activeSection, onSelect }) { return ( {GROUPS.map((group, idx) => ( 0 ? "mt-8" : ""}> {group.label} {group.items.map((item) => { const Icon = ICON_MAP[item.id]; return ( onSelect(item.id)} className={`w-full flex items-center gap-2 p-3 text-sm rounded-md font-medium transition-all duration-150 outline-none shadow-none group ${ activeSection === item.id ? "bg-gray-800 text-white font-medium" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900" }`} aria-current={activeSection === item.id ? "page" : undefined} > {Icon && ( )} {item.label} ); })} ))} Instant Image Generator Generate stunning images from multiple AI and stock photo sources instantly. ); }
{group.label}
Instant Image Generator
Generate stunning images from multiple AI and stock photo sources instantly.