import{d as x,ar as B,bm as D,A as i,bn as f,bo as v,bp as _,h,a9 as t,br as H}from"../../../../common/preload-helper.BAt0wiQU.js";import{p as I}from"../../index.CwVZreOu.js";import{u as N}from"../../../../common/settings-store.DAVbzJl3.js";/* empty css                                                                                      */import"../../../../common/DnDDataTableControl.vue_vue_type_style_index_0_scoped_0b913e4f_lang.CI1SyTf2.js";/* empty css                                                                                                 */import{_ as S}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.8NM1WLzi.js";/* empty css                                                                                        */import{I as L}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 M={class:"wwp-row-handle"},R={class:"wwp-left-content"},U={class:"wwp-right-content"},j=["innerHTML"],pe=x({__name:"TextControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(b,{emit:w}){var l,u;const g=b,{params:y}=B(g),C=N(),{showPopup:r,componentUpgrade:n}=D(C),e=y.value,o=i((l=e.default)!=null?l:""),s=i((u=e.disabled)!=null?u:!1),p=w,a=i([]);o.value!==""&&!s.value&&(a.value[e.id]=o.value,p("fieldData",a.value));const k=()=>{typeof e.pro<"u"&&e.pro!==null?(typeof e.pro_on_active<"u"&&e.pro_on_active!==null?e.pro_on_active&&o.value!==""&&(r.value=!0):r.value=!0,n.value=e.pro,o.value=""):(a.value[e.id]=o,p("fieldData",a.value))},V=()=>{typeof e.pro<"u"&&e.pro!==null&&(r.value=!0,n.value=e.pro)};return(q,d)=>{var m,c;return f(),v("div",M,[_("div",R,[h(t(S),{params:t(e)},null,8,["params"])]),_("div",U,[h(t(L),{id:t(e).id,value:o.value,"onUpdate:value":d[0]||(d[0]=T=>o.value=T),placeholder:t(e).placeholder,name:t(e).id,disabled:s.value,onInput:k,onClick:V},null,8,["id","value","placeholder","name","disabled"]),t(e).description!=="undefined"?(f(),v("p",{key:0,innerHTML:t(I)((c=(m=t(e))==null?void 0:m.description)!=null?c:"")},null,8,j)):H("",!0)])])}}});export{pe as default};
