import{h as x}from"./moment-a9aaa855.js";import{_ as f}from"./NoDataFound-bc81d7fa.js";import{_ as g}from"./Paginate-f61b79b2.js";import{s as h,A as v,c as l,a as c,b as t,F as i,r as d,t as e,i as k,g as y,o as a,n as u,u as m}from"./app-13978987.js";import{_ as C}from"./PageHeader-8c638686.js";import{_ as w}from"./UserLayout-6a50516d.js";import"./dropdown-45d66330.js";const D={class:"container flex-grow p-4 sm:p-6"},H={class:"mb-5 grid grid-cols-1 gap-8 sm:grid-cols-2 xl:grid-cols-3"},T={class:"flex items-center gap-3 p-5"},B={class:"flex flex-1 flex-col"},$={class:"text-sm tracking-wide text-slate-500"},j={class:"card card-body"},M={key:0,class:"table-responsive"},E={class:"job-alert-table table"},F={class:"border-0"},L=y({layout:w}),G=Object.assign(L,{__name:"History",props:["creditHistory","totalCharge","total","totalToday","buttons"],setup(o){const{textExcerpt:_}=h(),r=o,b=v(()=>[{title:"Total",value:r.total,icon:"bx bx-box",classes:"bg-primary-500 text-primary-500"},{title:"Total Credits",value:r.totalCharge,icon:"bx bx-dollar-circle",classes:"text-success-500 bg-success-500"},{title:"Total Credits",value:r.totalToday,icon:"bx bxs-receipt",classes:"text-warning-500 bg-warning-500"}]);return(n,N)=>(a(),l("main",D,[c(C,{title:"Credit Logs",buttons:o.buttons},null,8,["buttons"]),t("section",H,[(a(!0),l(i,null,d(b.value,(s,p)=>(a(),l("div",{key:p,class:"card rounded-2xl"},[t("div",T,[t("div",{class:u(["flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-xl bg-opacity-10",s.classes])},[t("i",{class:u(["text-2xl",s.icon])},null,2)],2),t("div",B,[t("p",$,e(s.title),1),t("h5",null,e(s.value),1)])])]))),128))]),t("div",j,[o.creditHistory.total?(a(),l("div",M,[t("table",E,[t("thead",null,[t("tr",null,[t("th",null,e(n.trans("Description")),1),t("th",null,e(n.trans("Credits")),1),t("th",null,e(n.trans("Date")),1)])]),t("tbody",F,[(a(!0),l(i,null,d(o.creditHistory.data,s=>(a(),l("tr",{key:s.id},[t("td",null,e(m(_)(s==null?void 0:s.description,50)),1),t("td",null,e(s.charge),1),t("td",null,[t("p",null,e(m(x)(s.updated_at).format("DD MMM Y")),1)])]))),128))])])])):(a(),k(f,{key:1})),c(g,{links:o.creditHistory.links},null,8,["links"])])]))}});export{G as default};
