import { type BuiltInTemplateId } from './template-registry.js'; /** * Controls which persistence layer is applied when materializing the built-in * `persistence` template. */ export type BuiltInPersistencePolicy = 'authenticated' | 'public'; export interface BuiltInTemplateVariantOptions { persistenceEnabled?: boolean; persistencePolicy?: BuiltInPersistencePolicy; } export interface MaterializedBuiltInTemplateSource { id: BuiltInTemplateId; defaultCategory: string; description: string; features: string[]; format: 'wp-typia'; templateDir: string; cleanup?: () => Promise; selectedVariant?: string | null; warnings?: string[]; } export interface BuiltInSharedTemplateLayer { dir: string; id: string; } export declare function listBuiltInSharedTemplateLayers(): readonly BuiltInSharedTemplateLayer[]; export declare function isBuiltInSharedTemplateLayerId(layerId: string): boolean; export declare function getBuiltInSharedTemplateLayerDir(layerId: string): string; export declare function getBuiltInTemplateOverlayDir(templateId: BuiltInTemplateId): string; export declare function getBuiltInTemplateSharedLayerDirs(templateId: BuiltInTemplateId, { persistenceEnabled, persistencePolicy }?: BuiltInTemplateVariantOptions): string[]; /** * Returns the ordered overlay directories for a built-in template. * * Persistence templates include the shared base, the persistence core layer, * the selected policy layer, and the thin template overlay. All other built-ins * resolve to the shared base plus their own template directory. */ export declare function getBuiltInTemplateLayerDirs(templateId: BuiltInTemplateId, options?: BuiltInTemplateVariantOptions): string[]; /** * Returns whether a missing built-in overlay directory is expected because the * template family no longer ships any Mustache assets in that layer. * * @param templateId Built-in template family being resolved. * @param layerDir Candidate overlay directory for that family. * @returns True when the missing layer can be skipped safely. */ export declare function isOmittableBuiltInTemplateLayerDir(templateId: BuiltInTemplateId, layerDir: string): boolean; export declare function resolveBuiltInTemplateSourceFromLayerDirs(templateId: BuiltInTemplateId, layerDirs: readonly string[]): Promise; /** * Materializes a built-in template into a temporary directory by copying each * resolved layer in order. * * Callers should invoke the returned `cleanup` function when they no longer * need the materialized directory. If copying fails, the temporary directory is * removed before the error is rethrown. */ export declare function resolveBuiltInTemplateSource(templateId: BuiltInTemplateId, options?: BuiltInTemplateVariantOptions): Promise;