"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[9383],{9383(e,t,a){a.r(t),a.d(t,{default:()=>r});var i=a(1609),l=a(6087),c=a(7723);const r=({field:e})=>{(0,l.useRef)();const t=(()=>{let e=wp.editor.getDefaultSettings();return e.tinymce.toolbar1="formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,fullscreen,wp_adv",e.tinymce.toolbar2="strikethrough,hr,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help",e.quicktags.buttons="strong,em,link,block,del,ins,img,ul,ol,li,code,more,close",e})();return(0,l.useEffect)(()=>{const a=`#${e._id}`,i=document.querySelector(a).closest(".rwmb-input").querySelector(".mce-container");i&&i.remove(),tinymce.remove(a),t.tinymce.selector=a,tinymce.init(t.tinymce)},[e.clone]),(0,i.createElement)("div",{className:"wp-core-ui wp-editor-wrap tmce-active"},(0,i.createElement)("div",{className:"wp-editor-tools"},(0,i.createElement)("div",{className:"wp-media-buttons"},(0,i.createElement)("button",{className:"button insert-media add_media"},(0,i.createElement)("span",{className:"wp-media-buttons-icon"}),(0,c.__)("Add Media","meta-box-builder"))),(0,i.createElement)("div",{className:"wp-editor-tabs"},(0,i.createElement)("button",{"aria-pressed":"true",className:"wp-switch-editor switch-tmce"},(0,c.__)("Visual","meta-box-builder")),(0,i.createElement)("button",{className:"wp-switch-editor switch-html"},(0,c.__)("Text","meta-box-builder")))),(0,i.createElement)("div",{className:"wp-editor-container"},(0,i.createElement)("textarea",{id:e._id})))}}}]);