import{_ as b}from"./PageHeader-8c638686.js";import{p as a,h as y,c as u,a as r,u as c,b as t,t as e,F as w,r as k,z as m,o as d,i as C,j as x,e as G,n as v,k as N}from"./app-13978987.js";import B from"./OverviewGrid-21ea6fc2.js";import{_ as F}from"./AdminLayout-bd13ff9d.js";import"./dropdown-45d66330.js";const S={class:"container flex-grow p-4 sm:p-6"},I={class:"space-y-6"},V={class:"table-responsive whitespace-nowrap rounded-primary"},j={class:"table"},A={scope:"col",class:"w-[30%]"},E={scope:"col",class:"w-[10%]"},L={scope:"col",class:"w-[10%]"},P={scope:"col",class:"w-[10%]"},T={scope:"col",class:"w-[20%]"},$={scope:"col",class:"w-[20%]"},z={class:"text-right"},D={class:"flex gap-2"},q={class:"avatar avatar-squire"},M=["src"],O={class:"text-sm font-medium whitespace-nowrap text-slate-700 dark:text-slate-100"},H={class:"text-xs truncate text-slate-500 dark:text-slate-400"},J={class:"text-right"},K={class:"text-center"},Q={class:"text-center"},R={class:"status"},U={class:"text-right"},W={class:"status"},X={class:"text-right"},Y={layout:F,components:{Link:m}},ot=Object.assign(Y,{__name:"Index",props:["gateways","active_gateway","totalGateways","inactive_gateway","buttons"],setup(n){const _=n,g=[{value:_.totalGateways,title:a("Total Gateways"),iconClass:"bx:bar-chart"},{value:_.active_gateway,title:a("Active Gateways"),iconClass:"bx:check"},{value:_.inactive_gateway,title:a("Inactive Gateways"),iconClass:"bx:x-circle"}];function p(o,l,i,s){if(o==null||!isFinite(o))throw new TypeError("number is not valid");if(!l){var f=o.toString().split(".").length;l=f>1?f:0}i||(i="."),s||(s=","),o=parseFloat(o).toFixed(l),o=o.replace(".",i);var h=o.split(i);return h[0]=h[0].replace(/\B(?=(\d{3})+(?!\d))/g,s),o=h.join(i),o}return(o,l)=>{const i=y("Icon");return d(),u("main",S,[r(b,{title:c(a)("Payment Gateways"),buttons:n.buttons},null,8,["title","buttons"]),t("div",I,[r(B,{items:g,grid:"3"}),t("div",V,[t("table",j,[t("thead",null,[t("tr",null,[t("th",A,e(c(a)("Name")),1),t("th",E,e(c(a)("Charge")),1),t("th",L,e(c(a)("Currency")),1),t("th",P,e(c(a)("Gateway Status")),1),t("th",T,e(c(a)("Payment Mode")),1),t("th",$,[t("div",z,e(c(a)("Action")),1)])])]),t("tbody",null,[(d(!0),u(w,null,k(n.gateways,s=>(d(),u("tr",{key:n.gateways.id},[t("th",null,[t("div",D,[t("div",q,[t("img",{class:"avatar-img",src:s.logo,alt:""},null,8,M)]),t("div",null,[s.logo!=null?(d(),C(c(m),{key:0,href:"/admin/gateways/"+s.id+"/edit"},{default:x(()=>[t("h6",O,e(s.name),1)]),_:2},1032,["href"])):G("",!0),t("p",H,e(c(a)("Limit : "))+" "+e(p(s.min_amount,2))+" - "+e(p(s.max_amount,2)),1)])])]),t("td",J,e(s.charge)+" "+e(s.currency!=null?s.currency:""),1),t("td",K,e(s.currency),1),t("td",Q,[t("div",{class:v(["badge",s.status==1?"badge-soft-success":"badge-soft-danger"])},[t("span",R,e(s.status==1?"Active":"Disabled"),1)],2)]),t("td",U,[t("span",{class:v(["badge",s.test_mode==1?"badge-soft-primary":"badge-soft-success"])},[t("span",W,e(s.test_mode==1?"Sandbox":"Production"),1)],2)]),t("td",null,[t("div",X,[r(c(m),{class:"btn btn-sm btn-primary",href:"/admin/gateways/"+s.id+"/edit"},{default:x(()=>[r(i,{icon:"bx:edit"}),N(" "+e(c(a)("Edit")),1)]),_:2},1032,["href"])])])]))),128))])])])])])}}});export{ot as default};
