"use client"; import { memo } from "react"; import type { CommunityRuleDocumentProps } from "./CommunityRuleDocument.types"; const SECTION_GAP = "var(--measures-spacing-1200, 64px)"; const TEAL_BG = "var(--color-teal-teal50, #c9fef9)"; const SECTION_LINE_COLOR = "var(--color-border-default-tertiary, #464646)"; function CommunityRuleDocumentView({ sections, className = "", useCardStyle = false, }: CommunityRuleDocumentProps) { const rootClass = useCardStyle ? `rounded-[12px] bg-white pl-3 border-l-4 ${className}` : className; const rootStyle = useCardStyle ? { borderLeftColor: TEAL_BG } : undefined; const sectionLineStyle = useCardStyle ? undefined : { borderLeftColor: SECTION_LINE_COLOR }; return (
{sections.map((section, sectionIndex) => (
{/* Section content: line runs full height of this block via border-left */}

{section.categoryName}

{section.entries.map((entry, entryIndex) => (

{entry.title}

{entry.body}

))}
))}
); } CommunityRuleDocumentView.displayName = "CommunityRuleDocumentView"; export default memo(CommunityRuleDocumentView);