import React, { useState } from "react"; import { ChevronDown, ChevronRight } from "lucide-react"; interface SectionCardProps { icon?: React.ReactNode; title: React.ReactNode; children: React.ReactNode; labelWidth?: string; // e.g., 'md:w-32' className?: string; style?: React.CSSProperties; chevronSize?: string; /** * If true, all fields are single column. If string[], only those fields are single column (by label). * If not provided, all fields use the default two-column layout. */ singleColumnFields?: string[] | boolean; } export function SectionCard({ icon, title, children, labelWidth = 'md:w-32', className = '', style, chevronSize = 'w-4 h-4' }: SectionCardProps) { const [expanded, setExpanded] = useState(true); React.useEffect(() => { const btn = document.getElementById(`section-card-header-${title && typeof title === 'string' ? title : ''}`); if (btn) { const chevron = btn.querySelector('svg'); if (chevron) { // Chevron positioning logic can go here if needed } const iconEl = btn.querySelector('.section-card-icon'); if (iconEl) { // Icon positioning logic can go here if needed } const label = btn.querySelector('span'); if (label) { // Label positioning logic can go here if needed } } }, [title]); return (