'use strict';
import _0x5f37bd from 'quill';
import _0x5ca88f from 'lodash.debounce';
import { richTextToolbarOptions, richTextThemes, richTextEditorEvents } from './rich-text-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x5c6aa9,_0x501fc3)=>__defProp(_0x5c6aa9,'name',{'value':_0x501fc3,'configurable':!![]});function initializeEditor(_0x5a8d63,_0xce1edb,_0x26e300,_0x2f5da4,_0x148151,_0x2b9a8e,_0x4a25bd,_0x521e50,_0xf83a3d){if(_0x2f5da4&&!_0xce1edb?.['current']){const _0x5833d6=new _0x5f37bd(_0x2f5da4,{'theme':richTextThemes['snow'],'modules':{'toolbar':richTextToolbarOptions},'placeholder':_0x148151,'readOnly':_0x2b9a8e});if(_0xf83a3d){const _0x392982=_0x5833d6['root'];_0x392982['id']=_0xf83a3d;}_0xce1edb&&(_0xce1edb['current']=_0x5833d6);_0x26e300?.(_0x5833d6),_0x5833d6['on'](richTextEditorEvents['textChange'],()=>{_0x5a8d63(_0x5833d6['root']['textContent']??'');});if(_0x4a25bd)_0x5833d6['root']['textContent']=_0x4a25bd;else _0x521e50&&(_0x5833d6['root']['textContent']=_0x521e50);}}__name(initializeEditor,'initializeEditor');function createDebouncedEditorUpdate(_0x937532){return _0x5ca88f((_0x1a6131,_0x14b48f)=>{_0x14b48f&&_0x14b48f['root']['textContent']!==_0x1a6131&&(_0x14b48f['root']['textContent']=_0x1a6131);},_0x937532);}__name(createDebouncedEditorUpdate,'createDebouncedEditorUpdate');

export { createDebouncedEditorUpdate, initializeEditor };
