<?php

declare(strict_types=1);

/**
 * Immutable input shared by every public section renderer.
 *
 * Authorable content is kept separate from runtimeData so editor contracts do
 * not accidentally expose request/query or resolved records as page fields.
 */
final class MyronSectionRenderContext
{
    /**
     * @param array<string, mixed> $section
     * @param array<string, mixed> $content
     * @param array<string, mixed> $publishedPage
     * @param array<string, array{type:string,richtext:bool}> $richtextFields
     * @param array<string, mixed> $runtimeData
     */
    public function __construct(
        public readonly string $componentId,
        public readonly string $variant,
        public readonly string $notes,
        public readonly string $intent,
        public readonly int $index,
        public readonly array $section,
        public readonly array $content,
        public readonly string $basePath,
        public readonly string $sourceBundleId,
        public readonly string $sourceTemplateId,
        public readonly bool $primaryHeading,
        public readonly bool $liveContentEnabled,
        public readonly bool $previewMode,
        public readonly string $title,
        public readonly string $body,
        public readonly string $classes,
        public readonly array $publishedPage = [],
        public readonly array $richtextFields = [],
        public readonly string $micPageId = '',
        public readonly string $micFieldKey = '',
        public readonly string $micChannel = 'public',
        public readonly array $runtimeData = [],
    ) {
    }
}
