import{_ as v}from"./AdminLayout-DeT_GLTC.js";import{_ as C}from"./NoDataFound-oJx-Mfyi.js";import{_ as x}from"./AssetModal-C18ToIEK.js";import{d as w,s as V,T as B,r as u,c as o,o as n,a as e,e as h,i as l,F as b,g as L,b as d,t as a,h as r,n as N,u as T,w as f}from"./app-Do7K7VDV.js";import"./ToastrContainer-CtYDvNPN.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";const $={class:"grid grid-cols-1 gap-6 md:grid-cols-2 xl:grid-cols-3"},D={class:"flex items-start justify-between"},F={class:"text-lg font-medium text-gray-900"},I={class:"mt-4 space-y-2 text-sm"},S={key:0},j={class:"capitalize"},z={class:"text-sm"},A={class:"text-red-600"},E={class:"flex flex-col"},M=["onClick"],O={class:"text-xs"},U=w({layout:v}),W=Object.assign(U,{__name:"ModuleList",props:{modules_nodes:Array},setup(i){const{badgeClass:k}=V(),c=B({module:"",status:""}),g=(t,_)=>{c.module=t,c.status=_?"disable":"enable",c.post(route("admin.module-settings-change-status"))};return(t,_)=>{var m;const p=u("Icon"),y=u("Link");return n(),o(b,null,[e("div",$,[(n(!0),o(b,null,L(i.modules_nodes,s=>(n(),o("div",{key:s.alias,class:"card card-body"},[e("div",D,[e("div",null,[e("h5",F,a(s.name||""),1),e("div",I,[s.description?(n(),o("p",S,a(t.trans("Description"))+" : "+a(s.description),1)):l("",!0),e("p",null,[r(a(t.trans("Type"))+" : ",1),e("span",j,a(s.module_type||""),1)]),e("p",null,[r(a(t.trans("Status"))+" : ",1),e("span",{class:N(T(k)(s.enabled?"success":"error"))},a(s.enabled?t.trans("Active"):t.trans("Inactive")),3)]),e("p",z,[r(a(t.trans("Version"))+" : ",1),e("span",A,"v"+a(s.version||""),1)])])]),d(x,{btnType:"icon","btn-class":"bg-dark-100 dark:bg-dark-900 rounded-full p-1"},{default:f(()=>[e("div",E,[e("button",{type:"button",class:"dropdown-link",onClick:q=>g(s.name,s.enabled)},[d(p,{icon:s.enabled?"bx:x-circle":"bx:check-circle"},null,8,["icon"]),e("span",O,a(s.enabled?t.trans("Disable"):t.trans("Enable")),1)],8,M),s.module_key?(n(),h(y,{key:0,class:"dropdown-link",href:t.route("admin.module-settings-check-version",(s==null?void 0:s.modules_core_name)||(s==null?void 0:s.alias))},{default:f(()=>[d(p,{icon:"mdi:download"}),r(" "+a(t.trans("Check Update")),1)]),_:2},1032,["href"])):l("",!0)])]),_:2},1024)])]))),128))]),!i.modules_nodes||((m=i.modules_nodes)==null?void 0:m.length)<1?(n(),h(C,{key:0})):l("",!0)],64)}}});export{W as default};
