import{d as y,ar as V,A as r,bn as c,bo as f,bp as v,h as w,a9 as t,br as E}from"../../../../common/preload-helper.BAt0wiQU.js";import{i as A,p as B,d as D}from"../../index.DetZ7Cvo.js";/* empty css                                                                                      */import"../../../../common/DnDDataTableControl.vue_vue_type_style_index_0_scoped_0b913e4f_lang.CI1SyTf2.js";/* empty css                                                                                                 */import{_ as T}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.8NM1WLzi.js";/* empty css                                                                                        */import{A as q}from"../../../../common/index.CaM6juwS.js";import"../../../../common/index.Bkgl5HZD.js";import"../../../../common/motion.DDNFslEg.js";import"../../../../common/FormItemContext.B-agHi0o.js";import"../../../../common/createContext.DKLY0CB7.js";import"../../../../common/statusUtils.-yEA-Gfk.js";import"../../../../common/SearchOutlined.DEk5RLel.js";import"../../../../common/compact-item.CKdY6bQm.js";import"../../../../common/index.C2RKq64j.js";import"../../../../common/index.BQlS3R_s.js";import"../../../../common/index.2Llx5d_f.js";import"../../../../common/useState.9-uUdCQD.js";import"../../../../common/warning.Dss1f44C.js";import"../../../../common/isPlainObject.DBTCFiJr.js";import"../../../../common/index.K7lONbTM.js";const H={class:"wwp-row-handle"},N={class:"wwp-left-content"},j={class:"wwp-right-content"},L=["innerHTML"],re=y({__name:"TextAreaControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(_,{emit:h}){var n,p;const b=_,{params:g}=V(b),e=g.value,i=r((e==null?void 0:e.default)||"");r((n=e.editor)!=null?n:!1).value&&A(e.id,{tinymce:{plugins:"charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview",toolbar1:"formatselect bold italic | bullist numlist | blockquote | alignleft aligncenter alignright | link unlink | wp_more | spellchecker",wp_theme:!0,setup:a=>{a.on("init",()=>{a.setContent(D(i.value))}),a.on("change",()=>{x(a.getContent())})}},mediaButtons:!0,quicktags:!0});const l=h,s=r((p=e.disabled)!=null?p:!1),o=r([]);i.value!==""&&!s.value&&(o.value[e.id]=i.value,l("fieldData",o.value));const k=()=>{o.value[e.id]=i,l("fieldData",o.value)},x=a=>{o.value[e.id]=a,l("fieldData",o.value)};return(a,d)=>{var m,u;return c(),f("div",H,[v("div",N,[w(t(T),{params:t(e)},null,8,["params"])]),v("div",j,[w(t(q),{id:t(e).id,value:i.value,"onUpdate:value":d[0]||(d[0]=C=>i.value=C),name:t(e).id,placeholder:t(e).placeholder,rows:4,disabled:s.value,onInput:k},null,8,["id","value","name","placeholder","disabled"]),t(e).description!=="undefined"?(c(),f("p",{key:0,innerHTML:t(B)((u=(m=t(e))==null?void 0:m.description)!=null?u:"")},null,8,L)):E("",!0)])])}}});export{re as default};
