import { type OperationIr } from "../ir/operations.js"; import { type VariantRecipe } from "../schema/recipe.js"; import { type CompileContext } from "./shared.js"; /** * Compile a `VariantRecipe` to an Operation IR. * * Emits two Sitecore writes — the per-rendering Headless Variants * folder (idempotent via the executor's CreateOrUpdate semantics) and * the VARIANT_DEFINITION item itself: * * 1. `HEADLESS_VARIANTS` at * `//` * 2. `VARIANT_DEFINITION` at * `//` * * The tree MUST be flat — no section-grouping intermediate. Pages * chrome walks exactly two levels under `headlessVariantsRoot` and * stops at the rendering folder; a `root/
//` * shape makes Pages discover zero variants for the rendering. The * inline-variants emission inside `component-template.ts:emitVariants` * documents this with a 2026-05-31 live-tenant verification — same * rule applies here. * * `recipe.content` (the TSX source for the head-repo sidecar) is NOT * consumed by this compile step — it's read by the install descriptor / * file-drop pipeline that writes the file into the head repo. scai's * scope is the Sitecore-side emission only. * * The canonical ComponentTemplateRecipe is NOT mutated by anything * this function emits — the only ops are creates under the * headless-variants folder. This is what makes "recipe is sacred" * a schema-enforceable property of brand variants rather than a * convention. */ export declare function compileVariantRecipe(input: VariantRecipe, context: CompileContext): OperationIr;