import { Observable } from 'babylonjs/Misc/observable'; import { Tools } from 'babylonjs/Misc/tools'; import { isUrl, camelToKebab, kebabToCamel } from '../helper'; import * as Handlebars from 'handlebars/dist/handlebars'; import { EventManager } from './eventManager'; import { ITemplateConfiguration } from '../configuration/interfaces'; import { deepmerge } from '../helper/'; import { IFileRequest } from 'babylonjs/Misc/fileRequest'; /** * The object sent when an event is triggered */ export interface EventCallback { event: Event; template: Template; selector: string; payload?: any; } /** * The template manager, a member of the viewer class, will manage the viewer's templates and generate the HTML. * The template manager managers a single viewer and can be seen as the collection of all sub-templates of the viewer. */ export class TemplateManager { /** * Will be triggered when any template is initialized */ public onTemplateInit: Observable