const e=new class{constructor(){this.RTE_DTO_RENDERER_MAP=new Map,this.RTE_TOOLBAR_BUTTON_RENDERER_MAP=new Map,this.hostToolbarButtonRendererMap=new WeakMap}registerRTEDTORenderer(e,r){const t=this.RTE_DTO_RENDERER_MAP.get(e);if(r&&t&&t.constructor.name!==r.constructor.name)throw new Error(`Renderer for type ${e} is already registered with a different class(${t.constructor.name}).`);this.RTE_DTO_RENDERER_MAP.set(e,r)}registerRTEToolbarButtonRenderer(e,r){this.RTE_TOOLBAR_BUTTON_RENDERER_MAP.set(e,r)}registerRTEToolbarButtonRendererForHost(e,r,t){let n=this.hostToolbarButtonRendererMap.get(e);n||(n=new Map,this.hostToolbarButtonRendererMap.set(e,n)),n.set(r,t)}getRTERenderer(e){return this.RTE_DTO_RENDERER_MAP.get(e)}getRTEToolbarButtonRenderer(e,r){var t,n;if(r){const n=null===(t=this.hostToolbarButtonRendererMap.get(r))||void 0===t?void 0:t.get(e);if(n)return n}return null!==(n=this.RTE_TOOLBAR_BUTTON_RENDERER_MAP.get(e))&&void 0!==n?n:null}};export{e as R}