import{_ as b}from"./Paginate-BZTS8QtF.js";import{_ as k}from"./NoDataFound-BCWTwO3P.js";import{d as g,s as v,r as u,c as a,o,a as t,b as l,e as y,t as s,F as m,g as C,w as N,h,n as x,u as _}from"./app-Do7K7VDV.js";import{_ as D}from"./AdminLayout-DeT_GLTC.js";import{h as A}from"./moment-BAtM24Ew.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const B={class:"table-responsive mt-4 w-full"},T={class:"table"},V={class:"!text-right"},$={key:0,class:"tbody"},I={class:"flex justify-end"},L={class:"dropdown","data-placement":"bottom-start"},M={class:"dropdown-toggle"},O={class:"dropdown-content w-56"},j={class:"dropdown-list"},E={class:"dropdown-list-item"},F=["onClick"],P=g({layout:D}),U=Object.assign(P,{__name:"Index",props:["overviews","templates"],setup(r){const{deleteRow:p}=v();return(e,R)=>{const f=u("Link"),i=u("Icon");return o(),a(m,null,[t("div",B,[t("table",T,[t("thead",null,[t("tr",null,[t("th",null,s(e.trans("Template Name")),1),t("th",null,s(e.trans("Device Name")),1),t("th",null,s(e.trans("Type")),1),t("th",null,s(e.trans("Owner")),1),t("th",null,s(e.trans("Status")),1),t("th",null,s(e.trans("Created At")),1),t("th",V,s(e.trans("Action")),1)])]),r.templates.data.length?(o(),a("tbody",$,[(o(!0),a(m,null,C(r.templates.data,(n,w)=>{var c;return o(),a("tr",{key:w},[t("td",null,s(n.name),1),t("td",null,s(((c=n.platform)==null?void 0:c.name)??"NA"),1),t("td",null,s(n.type),1),t("td",null,[l(f,{href:e.route("admin.users.show",n.owner)},{default:N(()=>{var d;return[h(s((d=n.owner)==null?void 0:d.name),1)]}),_:2},1032,["href"])]),t("td",null,[t("span",{class:x(["badge uppercase",["APPROVED","active"].includes(n.status)?"badge-success":"badge-warning"])},s(n.status),3)]),t("td",null,s(_(A)(n.created_at).format("D-MMM-Y")),1),t("td",null,[t("div",I,[t("div",L,[t("div",M,[l(i,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),t("div",O,[t("ul",j,[t("li",E,[t("button",{class:"dropdown-link delete-confirm",onClick:d=>_(p)(e.route("admin.logs.templates.destroy",n.id))},[l(i,{class:"h-5 text-3xl text-slate-400",icon:"bx:trash"}),h(" "+s(e.trans("Delete")),1)],8,F)])])])])])])])}),128))])):(o(),y(k,{key:1,forTable:!0}))])]),l(b,{links:r.templates.links},null,8,["links"])],64)}}});export{U as default};
