"use client"; import React, { useState } from "react"; import { ChevronDown, ChevronRight } from "lucide-react"; import { ConfigSectionDefinition } from "./ConfigPanelTypes"; interface ConfigSectionProps { section: ConfigSectionDefinition; children: React.ReactNode; } export function ConfigSection({ section, children }: ConfigSectionProps) { const [isOpen, setIsOpen] = useState(section.defaultOpen ?? true); if (section.collapsible) { return (
{isOpen &&
{children}
}
); } return (

{section.title}

{section.description && (

{section.description}

)}
{children}
); }