import { createTemplateBank } from '../../formula/template-bank.js';
export function createEngineFormulaTemplateNormalizationService(args) {
    const templateBank = createTemplateBank(args);
    return {
        clear() {
            templateBank.clearTransientCache();
        },
        reset() {
            templateBank.reset();
        },
        compileForCell(source, ownerRow, ownerCol) {
            return templateBank.resolve(source, ownerRow, ownerCol).compiled;
        },
        resolveForCell(source, ownerRow, ownerCol) {
            return templateBank.resolve(source, ownerRow, ownerCol);
        },
        resolveByTemplateId(templateId, source, ownerRow, ownerCol) {
            return templateBank.resolveById(templateId, source, ownerRow, ownerCol);
        },
        resolveTrustedByTemplateId(templateId, source, ownerRow, ownerCol) {
            return templateBank.resolveTrustedById(templateId, source, ownerRow, ownerCol);
        },
        getTemplateSnapshot(templateId) {
            return templateBank.get(templateId);
        },
        listTemplates() {
            return templateBank.list();
        },
        hydrateTemplates(snapshots) {
            templateBank.hydrate(snapshots);
        },
    };
}
//# sourceMappingURL=formula-template-normalization-service.js.map