export default function SectionWrapper({
    title,
    children,
    countLabel = 'items',
    count = [],
    countLabelPlural = 'items',
    button,
}: {
    title?: string;
    children: React.ReactNode;
    countLabel?: string;
    countLabelPlural?: string;
    count?: any[];
    button?: React.ReactNode;
}) {
    return (
        <div>
            {title &&

                <header className="flex items-center justify-between mb-4">
                    <h3 className="font-serif text-lg font-semibold">{title}
                        {count.length > 0 && (
                            <span className="ml-2 text-[12px] font-normal text-gray-500 normal-case tracking-normal">
                                {count.length} {count.length > 1 ? countLabelPlural : countLabel}
                            </span>
                        )}
                    </h3>
                    {button &&
                        <div>
                            {button}
                        </div>
                    }


                </header>}
            <div>{children}</div>
        </div>
    )


}