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