/**
 * FileManager — orchestrates template directory walking and delegates
 * filename resolution and file writing to dedicated modules.
 */
import type { AdditionalApi, LockFile, Property, TemplateElement } from '../domain/model.js';
import { type TemplateData } from './template-engine.js';
/**
 * Minimal logging surface used by the file manager and file writer.
 * Matches `oclif.Command.log` so commands can be passed directly.
 */
export interface FileLogger {
    log(message: string, ...args: unknown[]): void;
}
/**
 * Options for {@link generateFromTemplate} and {@link generateContents}.
 * Filtering and iteration-context fields are set internally when expanding template groups;
 * callers typically only set `force`, `lockFiles`, `templateData`, `verbose`, and the BC/module identifiers.
 */
export interface GenerateOptions {
    /** Bounded context name used for filename substitution (e.g. `__bounded_context_name__`). */
    boundedContextName?: string;
    /** Currently iterated additional API when expanding additional-@api templates. */
    currentAdditionalApi?: AdditionalApi;
    /** Currently iterated property when expanding per-property templates. */
    currentProperty?: Property;
    /** File path globs excluded from generation for this module. */
    excludedFiles?: string[];
    /** CRUD operations excluded for this module (e.g. `delete`, `update`). */
    excludedOperations?: string[];
    /** If true, overwrite existing files respecting the lockfile integrity check. */
    force?: boolean;
    /** Existing lockfile entries consulted when a file already exists on disk. */
    lockFiles?: LockFile[];
    /** Module name used for filename substitution (`__module_name__`). */
    moduleName?: string;
    /** Plural form of the module name (`__module_names__`). */
    moduleNames?: string;
    /** Data passed into the Eta renderer as `it`. */
    templateData?: TemplateData;
    /** If false, skip Eta rendering and copy the template contents verbatim. */
    useTemplateEngine?: boolean;
    /** If true, log per-file and per-region detail under INFO/OVERWRITE/REGION tags. */
    verbose?: boolean;
}
/** Accumulated state of a generation run, mutated across recursive calls. */
export interface GenerationResult {
    /** Lockfile entries captured during the run. Persisted by the caller. */
    lockFiles: LockFile[];
    /** Paths of `.origin.*` files written because the skeleton was user-modified. */
    originFiles: string[];
}
/**
 * Generate every file under a template element into the consumer project.
 * Main programmatic entry point of the generator engine.
 *
 * @param logger - Sink for `[FILE CREATED]`, `[FILE OVERWRITE]`, `[REGION ...]` logs.
 * @param templateElement - Which template tree to expand (see {@link TemplateElement}).
 * @param relativeTargetBasePath - Output tree relative to `process.cwd()` (`backend`, `frontend`).
 * @param relativeTargetPath - Subdirectory under the base.
 * @param options - See {@link GenerateOptions}.
 * @param result - Accumulator. Pass across multiple calls to collect combined lockfile/origin lists.
 * @returns The (possibly pre-existing) `result`, for chaining.
 */
export declare function generateFromTemplate(logger: FileLogger, templateElement: TemplateElement, relativeTargetBasePath: string, relativeTargetPath: string, options?: GenerateOptions, result?: GenerationResult): Promise<GenerationResult>;
/**
 * Recursively walk a template directory and generate every file into the target.
 * Applies filename substitution, exclusion filters, and overwrite rules from {@link GenerateOptions}.
 * Prefer {@link generateFromTemplate} unless you need a custom directory outside the bundled tree.
 */
export declare function generateContents(logger: FileLogger, originPath: string, relativeTargetBasePath: string, relativeTargetPath: string, options?: GenerateOptions, result?: GenerationResult): Promise<void>;
