/**
 * Template Service
 *
 * Manages template lifecycle: create, read, update, delete, search.
 *
 * @since v1.69.0
 */
import type { ConfigTemplate, TemplateApplyOptions, TemplateApplyResult, TemplateMetadata, TemplateRenderResult, TemplateSearchOptions, TemplateSearchResult, TemplateValidationResult, TemplateVariableValues } from './template-types.js';
/**
 * Template service for managing templates
 */
export declare class TemplateService {
    private templates;
    private engine;
    private validator;
    constructor();
    /**
     * Register a template
     */
    register(template: ConfigTemplate): TemplateValidationResult;
    /**
     * Get a template by ID
     */
    get(id: string): ConfigTemplate | undefined;
    /**
     * Check if template exists
     */
    has(id: string): boolean;
    /**
     * Remove a template
     */
    remove(id: string): boolean;
    /**
     * Get all templates
     */
    getAll(): ConfigTemplate[];
    /**
     * Search templates
     */
    search(options?: TemplateSearchOptions): TemplateSearchResult;
    /**
     * Get templates for a specific plugin
     */
    getForPlugin(pluginId: string): ConfigTemplate[];
    /**
     * Get templates by category
     */
    getByCategory(category: ConfigTemplate['category']): ConfigTemplate[];
    /**
     * Render a template with variables
     */
    render(templateId: string, variables: TemplateVariableValues): TemplateRenderResult | undefined;
    /**
     * Preview rendering without applying
     */
    preview(templateId: string, variables: TemplateVariableValues): TemplateRenderResult | undefined;
    /**
     * Apply a template (render + write files)
     * Note: Actual file writing should be done by caller
     */
    apply(templateId: string, variables: TemplateVariableValues, options?: TemplateApplyOptions): TemplateApplyResult | undefined;
    /**
     * Validate a template
     */
    validate(template: ConfigTemplate): TemplateValidationResult;
    /**
     * Validate variable values
     */
    validateVariables(templateId: string, variables: TemplateVariableValues): TemplateValidationResult | undefined;
    /**
     * Create a new template from scratch
     */
    create(partial: Partial<ConfigTemplate> & Pick<ConfigTemplate, 'id' | 'name' | 'plugins'>): ConfigTemplate;
    /**
     * Duplicate a template with a new ID
     */
    duplicate(templateId: string, newId: string): ConfigTemplate | undefined;
    /**
     * Update template metadata
     */
    updateMetadata(templateId: string, updates: Partial<TemplateMetadata>): boolean;
    /**
     * Get template count
     */
    count(): number;
    /**
     * Clear all templates
     */
    clear(): void;
    private resolveInheritance;
    private mergeVariables;
    private applyDefaults;
}
/**
 * Get template service singleton
 */
export declare function getTemplateService(): TemplateService;
/**
 * Reset template service (for testing)
 */
export declare function resetTemplateService(): void;
//# sourceMappingURL=template-service.d.ts.map