import{d as V,t as D,r as i,o as f,c as v,b as r,e as _,u as e,Z as H,a0 as B,H as M,Q as N,g as S}from"../../../../common/index.DXvi0yH9.js";import{u as I}from"../../../../common/settings-store.BEthvEFu.js";import{s as L}from"../../../../common/pinia.D9yoqqEz.js";/* empty css                                                                                       *//* empty css                                                                                 */import"../../../../common/Confirmation.vue_vue_type_script_setup_true_lang.BvpajMdU.js";import{_ as R}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.B_b65Eg0.js";import{_ as U}from"../../../../common/Tooltip.vue_vue_type_script_setup_true_lang.BBmniJxI.js";import{_ as $}from"../../../../common/_plugin-vue_export-helper.DlAUqK2U.js";import"../../../../common/transition.CRNcmuQX.js";import"../../../../common/keyboard.D4P2wQc7.js";import"../../../../common/open-closed.CQX5sZkx.js";import"../../../../common/micro-task.CxIZtCgj.js";const j={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},q={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},z=["id","name","disabled","placeholder"],E=["innerHTML"],O=V({__name:"TextControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(g,{emit:b}){var w,p;const x=g,{params:y}=D(x),h=I(),{showPopup:a,componentUpgrade:n}=L(h),t=y.value,s=i((w=t.default)!=null?w:""),o=i((p=t.disabled)!=null?p:!1),u=b,l=i([]);s.value!==""&&!o.value&&(l.value[t.id]=s.value,u("fieldData",l.value));const C=()=>{typeof t.pro<"u"&&t.pro!==null?(typeof t.pro_on_active<"u"&&t.pro_on_active!==null?t.pro_on_active&&s.value!==""&&(a.value=!0):a.value=!0,n.value=t.pro,s.value=""):(l.value[t.id]=s.value,u("fieldData",l.value))},k=()=>{typeof t.pro<"u"&&t.pro!==null&&(a.value=!0,n.value=t.pro)};return(P,d)=>{var c,m;return f(),v("div",null,[r("div",j,[_(e(R),{params:e(t)},null,8,["params"])]),r("div",q,[H(r("input",{id:e(t).id,"onUpdate:modelValue":d[0]||(d[0]=T=>s.value=T),name:e(t).id,disabled:o.value,placeholder:e(t).placeholder,type:"text",onInput:C,onClick:k,class:M(["stwlite-tw-block stwlite-tw-w-full stwlite-tw-max-w-xs stwlite-tw-px-3 stwlite-tw-py-2 stwlite-tw-border stwlite-tw-border-gray-300 stwlite-tw-rounded-md stwlite-tw-shadow-sm stwlite-tw-placeholder-gray-400 focus:stwlite-tw-outline-none focus:stwlite-tw-ring-2 focus:stwlite-tw-ring-blue-500 focus:stwlite-tw-border-blue-500",o.value?"stwlite-tw-bg-gray-100 stwlite-tw-text-gray-500 stwlite-tw-cursor-not-allowed":"stwlite-tw-bg-white stwlite-tw-text-gray-900"])},null,42,z),[[B,s.value]]),_(e(U),{params:e(t)},null,8,["params"])]),e(t).description!=="undefined"?(f(),v("p",{key:0,class:"stwlite-tw-text-sm stwlite-tw-text-gray-600 stwlite-tw-mt-2",innerHTML:e(N)((m=(c=e(t))==null?void 0:c.description)!=null?m:"")},null,8,E)):S("",!0)])}}}),lt=$(O,[["__scopeId","data-v-ed47c595"]]);export{lt as default};
