import{y,z as _,i as c,j as g,a as h,c as d,e as o,o as u,f as e,d as m,t as n,w as V,g as x,u as p,q as b}from"./vue.esm-bundler-DZdE0M9V.js";import{t as v}from"./Translator-Bios5QX5.js";import{B as S}from"./Badge-CAEsoWyQ.js";import"./Arr-MwYQQ3qa.js";import"./Str-Ckn63bs5.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DynamicIcon-D-LZibaK.js";const k={key:0,class:"fct-content-card-list-item py-4 px-6"},q={class:"fct-content-card-list-head"},B={class:"flex items-start gap-2 flex-row"},w={class:"mb-0"},M={key:0,class:"fct-content-card-list-content"},j={class:"fct-content-card-list-action"},C={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 g(()=>{a.value=t.value.active,r.value=!0}),(N,i)=>{const f=h("el-switch");return r.value?(u(),d("div",k,[e("div",q,[e("div",B,[e("h4",w,n(s.field.title),1),m(S,{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",j,[e("div",C,[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};
