import { type CreateItemOp, type Operation } from "../ir/operations.js"; import { type CompileContext } from "./shared.js"; /** * Ensure a section folder (under `componentsRoot/
`) exists. * Idempotent: emits a CreateOnly CreateItem op the first time a given * (site, section) pair is seen and records the refKey in the * `emittedFolders` set so subsequent calls are no-ops. * * Returns the section folder's refKey for downstream callers that want * to nest items under it. */ export declare const ensureSectionFolder: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set) => string; /** * Ensure a "Component Folders" subfolder exists under the section * folder. Idempotent. */ export declare const ensureComponentFoldersBucket: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set) => string; /** * Ensure a "Presentation Parameters" subfolder exists under the section * folder. Idempotent. */ export declare const ensurePresentationDesignParametersBucket: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set) => string; /** * Ensure a section subfolder under the renderings tree exists — * `/
/`. Mirrors the templates side; the * rendering tree shape mirrors the template tree per the layout plan. */ export declare const ensureRenderingsSectionFolder: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set) => string; /** * Ensure a Content Models group folder exists. Returns the refKey for * downstream `CreateItem.parent` references. Idempotent across * repeated calls within one recipe-set compile. */ export declare const ensureContentModelsGroupFolder: (operations: Operation[], context: CompileContext, group: string, emittedFolders: Set) => string | undefined; /** * Ensure a page-templates group folder exists under `/`, * where `` is `pageTemplatesRoot` (falling back to `templatesRoot`). * Returns the refKey for `CreateItem.parent`, or `undefined` when no * root resolves. Idempotent across one recipe-set compile via * `emittedFolders`. Mirror of `ensureContentModelsGroupFolder` for the * page-template tree. */ export declare const ensurePageTemplatesGroupFolder: (operations: Operation[], context: CompileContext, group: string, emittedFolders: Set) => string | undefined; /** * Ensure the grouping-folder chain for an enumeration's `location.folder` * exists under ``, and return the leaf's * `{ parentPath, parentRef }` so the per-enum container nests under it. * * Multi-segment paths (`"Theme/Color"` → `["Theme", "Color"]`) emit ONE * `CreateItem` per cumulative segment, each conforming to the per-site * `Enumerations Folder` template (`folderTemplateRefKey`) — an explicit * emit per segment is required so the executor's path-walker doesn't * auto-create intermediates as the generic `Folder` template (which lacks * the Enumerations Folder Standard Values, breaking the author Insert * Options chain). Each segment is keyed on its CUMULATIVE path via * `enumerationsGroupingFolderId`, so recipes sharing a prefix reuse the * same items; `emittedFolders` dedups within one compile. * * When a segment's refKey is already in `emittedFolders` (e.g. pre-seeded * by the `__shared-folders__` aggregate, or emitted by an earlier recipe) * the `CreateItem` is skipped but the parent chain is still walked, so the * returned leaf ref is correct regardless. */ export declare const ensureEnumerationGroupingFolders: (operations: Operation[], context: CompileContext, folderSegments: readonly string[] | undefined, folderTemplateRefKey: string, emittedFolders: Set) => { parentPath: string; parentRef: CreateItemOp["parent"]; };