import{_ as g}from"./AdminLayout-bd13ff9d.js";import{_ as b}from"./PageHeader-8c638686.js";import{s as v,l as w,A as k,p as s,T as x,h as u,c,a as n,b as t,t as a,u as e,F as C,r as y,i as A,g as I,o as l,n as p,j as $}from"./app-13978987.js";import{_ as D}from"./Paginate-f61b79b2.js";import{h as B}from"./moment-a9aaa855.js";import M from"./OverviewGrid-21ea6fc2.js";import{d as F}from"./drawer-fe4c5e1a.js";import{_ as L}from"./NoDataFound-bc81d7fa.js";import"./dropdown-45d66330.js";const T={class:"container p-4 sm:p-6"},j={class:"space-y-6"},E={class:"table-responsive whitespace-nowrap rounded-primary"},N={class:"table"},V={class:"text-right"},z={key:0},O={class:"text-left"},P=["src"],R={class:"text-left"},S={class:"text-left"},Y={class:""},q={class:"dropdown","data-placement":"bottom-start"},G={class:"dropdown-toggle"},H={class:"dropdown-content w-40"},J={class:"dropdown-list"},K={class:"dropdown-list-item"},Q={class:"dropdown-list-item"},U=["onClick"],W=I({layout:g}),rt=Object.assign(W,{__name:"Index",props:["integrations","total","active","inActive","buttons"],setup(i){const{deleteRow:h}=v();w(()=>{F.init()});const r=i,m=k(()=>[{value:r.total,title:s("Total"),iconClass:"bx:badge"},{value:r.active,title:s("Active"),iconClass:"bx:badge-check"},{value:r.inActive,title:s("Inactive"),iconClass:"bx:x-circle"}]);return x({title:"",preview:"",short_description:"",description:"",is_featured:"",meta:{seo:{title:"",image:"",description:"",tags:""}},status:"active"}),(_,X)=>{const d=u("Icon"),f=u("Link");return l(),c("main",T,[n(b,{title:"Integrations",buttons:i.buttons},null,8,["buttons"]),t("div",j,[n(M,{items:m.value,grid:"3"},null,8,["items"]),t("div",E,[t("table",N,[t("thead",null,[t("tr",null,[t("th",null,a(e(s)("Preview")),1),t("th",null,a(e(s)("Title")),1),t("th",null,a(e(s)("Is Active")),1),t("th",null,a(e(s)("Is Featured")),1),t("th",null,a(e(s)("Created At")),1),t("th",null,[t("p",V,a(e(s)("Action")),1)])])]),i.integrations.total?(l(),c("tbody",z,[(l(!0),c(C,null,y(i.integrations.data,o=>(l(),c("tr",{key:o.id},[t("td",O,[t("img",{src:o.preview,class:"h-12",alt:"preview"},null,8,P)]),t("td",null,a(o.title),1),t("td",R,[t("span",{class:p(["badge",o.is_active?"badge-success":"badge-danger"])},a(o.is_active?e(s)("Active"):e(s)("Draft")),3)]),t("td",S,[t("span",{class:p(["badge",o.is_featured?"badge-success":"badge-danger"])},a(o.is_featured?e(s)("Active"):e(s)("Draft")),3)]),t("td",null,a(e(B)(o.created_at).format("D-MMM-Y")),1),t("td",Y,[t("div",q,[t("div",G,[n(d,{class:"w-30 text-lg",icon:"bi:three-dots-vertical"})]),t("div",H,[t("ul",J,[t("li",K,[n(f,{href:_.route("admin.integrations.edit",o),class:"dropdown-link"},{default:$(()=>[n(d,{class:"w-30 text-lg",icon:"bx:edit"}),t("span",null,a(e(s)("Edit")),1)]),_:2},1032,["href"])]),t("li",Q,[t("button",{as:"button",class:"dropdown-link",onClick:Z=>e(h)(_.route("admin.integrations.destroy",o.id))},[n(d,{class:"w-30 text-lg",icon:"bx:trash"}),t("span",null,a(e(s)("Delete")),1)],8,U)])])])])])]))),128))])):(l(),A(L,{key:1,"for-table":"true"}))])])]),n(D,{links:i.integrations.links},null,8,["links"])])}}});export{rt as default};
