import React from 'react'; interface ThemeClasses { title: string; heading: string; text: string; } interface Section { heading: string; text: string; list?: string[]; } interface Content { title: string; sections: Section[]; } const getThemeClasses = (theme: 'dark' | 'light'): ThemeClasses => ({ title: theme === 'dark' ? 'text-white' : '!text-gray-900', heading: theme === 'dark' ? 'text-white' : '!text-gray-900', text: theme === 'dark' ? 'text-gray-200' : '!text-gray-900' }); const renderSection = (section: Section, theme: 'dark' | 'light') => { const themeClasses = getThemeClasses(theme); const textColor = themeClasses.text; return (

{section.heading}

{section.text}

{section.list && ( )}
); }; export const renderDisclaimerContent = (content: Content | null, theme: 'dark' | 'light' = 'dark'): React.ReactNode => { if (!content) return null; const themeClasses = getThemeClasses(theme); return (

{content.title}

{content.sections.map((section) => renderSection(section, theme))}
); };