import{z as p,t as f,g as l,A as t,j as o,D as m,H as c,P as b,G as h,O as u,J as k,r as y}from"./index-DOFLUERq.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={key:0,class:"field-controls"},T=["placeholder"],g=["value","disabled"],x={key:4,class:"mt-2 form-control",type:"text",style:{height:"110px"},readonly:""},H=["innerHTML"],M=["innerHTML"],S={__name:"DataControl",props:["df","value","read_only"],setup(e){const s=e;let a=p(),d=y(""),i=y("");return s.df.fieldtype==="Datetime"&&(d.value=Intl.DateTimeFormat().resolvedOptions().timeZone),s.df.fieldtype==="Color"&&(i.value=f("Choose a color")),s.df.fieldtype==="Icon"&&(i.value=f("Choose an icon")),(r,n)=>(l(),t("div",{class:c(["control form-builder-control",{editable:o(a).label}])},[o(a).label?(l(),t("div",D,[m(r.$slots,"label",{},void 0,!0),m(r.$slots,"actions",{},void 0,!0)])):(l(),t("div",{key:1,class:c(["control-label label",{reqd:e.df.reqd}])},b(e.df.label),3)),o(a).label?(l(),t("input",{key:2,class:"form-control",type:"text",style:h({height:e.df.fieldtype=="Table MultiSelect"?"42px":""}),placeholder:o(i),readonly:""},null,12,T)):(l(),t("input",{key:3,class:"form-control",type:"text",value:e.value,disabled:e.read_only||e.df.read_only,onInput:n[0]||(n[0]=v=>r.$emit("update:modelValue",v.target.value))},null,40,g)),o(a).label&&e.df.fieldtype==="Barcode"?(l(),t("input",x)):u("",!0),e.df.description?(l(),t("div",{key:5,class:"mt-2 description",innerHTML:e.df.description},null,8,H)):u("",!0),o(d)?(l(),t("div",{key:6,class:c(["time-zone",e.df.description?"":"mt-2"]),innerHTML:o(d)},null,10,M)):u("",!0),n[1]||(n[1]=k("div",{class:"selected-color no-value"},null,-1))],2))}},I=C(S,[["__scopeId","data-v-1d7bcc6e"]]);export{I as default};
