import{A as y,B as _,h as c,i as h,r as g,e as d,b as o,o as u,d as e,a as m,t as n,w as V,f as x,u as p,x as b}from"./vue.esm-bundler.js?ver=1.3.21";import{t as v}from"./Translator.js?ver=1.3.21";import{B}from"./Badge.js?ver=1.3.21";import"./Arr.js?ver=1.3.21";import"./_plugin-vue_export-helper.js?ver=1.3.21";import"./DynamicIcon.js?ver=1.3.21";import"./Str.js?ver=1.3.21";const S={key:0,class:"fct-content-card-list-item py-4 px-6"},k={class:"fct-content-card-list-head"},q={class:"flex items-start gap-2 flex-row"},w={class:"mb-0"},M={key:0,class:"fct-content-card-list-content"},C={class:"fct-content-card-list-action"},N={class:"pr-4"},I={__name:"ModuleSettings",props:y({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=_(s,"modelValue"),a=c(!1),r=c(!1);return h(()=>{a.value=t.value.active,r.value=!0}),(j,i)=>{const f=g("el-switch");return r.value?(u(),d("div",S,[e("div",k,[e("div",q,[e("h4",w,n(s.field.title),1),m(B,{size:"small",type:a.value==="yes"?"active":"inactive","hide-icon":!0},{default:V(()=>[x(n(a.value==="yes"?p(v)("Active"):p(v)("Inactive")),1)]),_:1},8,["type"])])]),s.field.description?(u(),d("div",M,[e("p",null,n(s.field.description),1)])):o("",!0),e("div",C,[e("div",N,[m(f,{"active-value":"yes","inactive-value":"no",modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),onChange:i[1]||(i[1]=l=>{(!t.value||typeof t.value!="object")&&(t.value={}),b(()=>{t.value.active=l})})},null,8,["modelValue"])]),o("",!0)])])):o("",!0)}}};export{I as default};
