import { type OperationIr } from "../ir/operations.js"; import { type ComponentSectionRecipe } from "../schema/recipe.js"; import { type CompileContext } from "./shared.js"; /** * Compile a `ComponentSectionRecipe` to an Operation IR. * * Owns the three SECTION-LEVEL organisational items (one each per * `(site, section.name)`): * * 1. Templates section folder — `//` * 4. Renderings-tree section folder — `//` * 5. Headless Variants section — `//` * * Each carries the recipe's `displayName`, `icon`, and `sortOrder` * fields so the SXA editor's tree shows the section with the author's * intent. `compileRecipeSet` MUST process section recipes BEFORE * component recipes — the per-section sentinels seeded into * `emittedFolders` here make subsequent `ensureSectionFolder` / * `ensureRenderingsSectionFolder` calls from component recipes * no-op-with-the-section-already-existing. * * The two SUBORDINATE buckets (#2 Component Folders, #3 Presentation * Parameters) are NOT emitted here — they're emitted lazily by * `ensureComponentFoldersBucket` / `ensurePresentationDesignParametersBucket` * when a component recipe in the section actually needs them. They live * under the section folder so they inherit positional context but get * the default `FOLDER_ICON` (no per-bucket rich fields by design). * * The Available Renderings item (#6) is emitted by the cross-recipe * aggregate `buildAvailableRenderingsAggregate` in `compile.ts`; it * reads sections via the same `sectionsByHandle` map and applies the * section recipe's `displayName` to the toolbox label. */ export declare function compileComponentSectionRecipe(input: ComponentSectionRecipe, context: CompileContext, emittedFolders?: Set): OperationIr; /** * Look up a `ComponentSectionRecipe` by handle. Throws INPUT_INVALID * with a helpful hint when a component references a section handle no * `ComponentSectionRecipe` in the set provides — this is the * cross-recipe validation that closes the implicit-fallback gap the * old `section: string` field had. * * `consumerHandle` is the recipe doing the lookup (used in the error * message so authors can locate the source of the bad reference). */ export declare const resolveSectionRecipe: (consumerHandle: string, sectionHandle: string, sectionsByHandle: ReadonlyMap | undefined) => ComponentSectionRecipe;