import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{z as f,g as t,A as l,j as a,D as i,P as y,G as r,O as h,H as x,c as b}from"./index-DOFLUERq.js";const g={key:0,class:"field-controls"},v={key:1,class:"control-label label"},p=["value","disabled"],k=["innerHTML"],H={__name:"TextControl",props:["df","value","read_only","modelValue"],emits:["update:modelValue"],setup(e,{emit:S}){const u=e;let o=f(),n=b(()=>u.df.fieldtype==="Small Text"?"150px":"300px");return(s,d)=>(t(),l("div",{class:x(["control",{editable:a(o).label}])},[a(o).label?(t(),l("div",g,[i(s.$slots,"label",{},void 0,!0),i(s.$slots,"actions",{},void 0,!0)])):(t(),l("div",v,y(e.df.label),1)),a(o).label?(t(),l("textarea",{key:2,style:r({height:a(n),maxHeight:e.df.max_height??""}),class:"form-control",type:"text",readonly:""},null,4)):(t(),l("textarea",{key:3,style:r({height:a(n),maxHeight:e.df.max_height??""}),class:"form-control",type:"text",value:e.value,disabled:e.read_only||e.df.read_only,onInput:d[0]||(d[0]=c=>s.$emit("update:modelValue",c.target.value))},null,44,p)),e.df.description?(t(),l("div",{key:4,class:"mt-2 description",innerHTML:e.df.description},null,8,k)):h("",!0)],2))}},C=m(H,[["__scopeId","data-v-ad4eae9e"]]);export{C as default};
