"use client"; import { vipnagorgialla } from "@/components/Vipnagorgialla"; interface RuleSection { title: string; rules: ( | string | { main: string; sub: (string | { main: string; sub: string[] })[] } )[]; } interface RulesContentProps { sections: RuleSection[]; } function RuleItem({ rule, index, }: { rule: | string | { main: string; sub: (string | { main: string; sub: string[] })[] }; index: number; }) { if (typeof rule === "string") { return (
  • {/* Fixed min-width prevents numbers from shifting text as digits grow (e.g., 9. vs 10.) */} {index}.
    {rule}
  • ); } return (
  • {/* Main rule row */}
    {index}.
    {rule.main}
    {rule.sub && rule.sub.length > 0 && (
      {rule.sub.map((subRule, subIndex) => { if (typeof subRule === "string") { return (
    1. {index}.{subIndex + 1}.
      {subRule}
    2. ); } return (
    3. {index}.{subIndex + 1}.
      {subRule.main}
      {subRule.sub && subRule.sub.length > 0 && (
        {subRule.sub.map((subSubRule, subSubIndex) => (
      1. {index}.{subIndex + 1}.{subSubIndex + 1}.
        {subSubRule}
      2. ))}
      )}
    4. ); })}
    )}
  • ); } export default function RulesContent({ sections }: RulesContentProps) { return (
    {sections.map((section, sectionIndex) => (

    {sectionIndex + 1}) {section.title}

      {section.rules.map((rule, ruleIndex) => ( ))}
    ))}
    ); }