/// <reference types="node" />
import type { AuxiliaryStrategy } from '../../http/auxiliary/AuxiliaryStrategy';
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';
import type { FileIdentifierMapperFactory } from '../../storage/mapping/FileIdentifierMapper';
import type { ResourceSet } from '../../storage/ResourceSet';
import type { TemplateEngine } from '../../util/templates/TemplateEngine';
import type { Resource } from './ResourcesGenerator';
import type { TemplatedResourcesGenerator } from './TemplatedResourcesGenerator';
import Dict = NodeJS.Dict;
/**
 * Input arguments required for {@link BaseResourcesGenerator}
 */
export interface SubfolderResourcesGeneratorArgs {
    /**
     * Factory used to generate mapper relative to the base identifier.
     */
    factory: FileIdentifierMapperFactory;
    /**
     * Template engine for generating the resources.
     */
    templateEngine: TemplateEngine;
    /**
     * The extension of files that need to be interpreted as templates.
     * Will be removed to generate the identifier.
     */
    templateExtension?: string;
    /**
     * The metadataStrategy
     */
    metadataStrategy: AuxiliaryStrategy;
    /**
     * The default ResourceStore
     */
    store: ResourceSet;
}
/**
 * Generates resources by making use of a template engine.
 * The template folder structure will be kept.
 * Folders will be interpreted as containers and files as documents.
 * A FileIdentifierMapper will be used to generate identifiers that correspond to the relative structure.
 *
 * Metadata resources will be yielded separately from their subject resource.
 *
 * A relative `templateFolder` is resolved relative to cwd,
 * unless it's preceded by `@css:`, e.g. `@css:foo/bar`.
 */
export declare class BaseResourcesGenerator implements TemplatedResourcesGenerator {
    protected readonly logger: import("../..").Logger;
    private readonly factory;
    private readonly templateEngine;
    private readonly templateExtension;
    private readonly metadataStrategy;
    private readonly store;
    /**
     * A mapper is needed to convert the template file paths to identifiers relative to the given base identifier.
     *
     * @param args - TemplatedResourcesGeneratorArgs
     */
    constructor(args: SubfolderResourcesGeneratorArgs);
    generate(templateFolder: string, location: ResourceIdentifier, options: Dict<unknown>): AsyncIterable<Resource>;
    /**
     * Generates results for all entries in the given folder, including the folder itself.
     */
    private processFolder;
    /**
     * Creates a TemplateResourceLink for the given filePath,
     * which connects a resource URL to its template file.
     * The identifier will be based on the file path stripped from the template extension,
     * but the filePath parameter will still point to the original file.
     */
    private toTemplateLink;
    /**
     * Generates TemplateResourceLinks for each entry in the given folder
     * and combines the results so resources and their metadata are grouped together.
     */
    private groupLinks;
    /**
     * Generates a Resource object for the given ResourceLink.
     * In the case of documents the corresponding template will be used.
     * If a ResourceLink of metadata is provided the corresponding metadata resource
     * will be yielded as a separate resource.
     */
    private generateResource;
    /**
     * Generates a RepresentationMetadata using the given template.
     */
    private generateMetadata;
    /**
     * Creates a read stream from the file and applies the template if necessary.
     */
    private processFile;
}
