var o=Object.defineProperty;var d=(t,e,r)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var s=(t,e,r)=>d(t,typeof e!="symbol"?e+"":e,r);import{b as a,B as i}from"./bootstrap-BsWQM_6D.js";import"./currency-Dtag6qPd.js";import"./chart-CAYz1qzV.js";import"./runtime-core.esm-bundler-VrNrzzXC.js";class n{constructor(){s(this,"_day");s(this,"_bestCustomers");s(this,"_bestCashiers");s(this,"_weeksSummary");s(this,"_recentOrders");s(this,"_reports",{day:a.get("/api/dashboard/day"),bestCustomers:a.get("/api/dashboard/best-customers"),weeksSummary:a.get("/api/dashboard/weeks"),bestCashiers:a.get("/api/dashboard/best-cashiers"),recentOrders:a.get("/api/dashboard/recent-orders")});this._day=new i({}),this._bestCustomers=new i([]),this._weeksSummary=new i({}),this._bestCashiers=new i([]),this._recentOrders=new i([]);for(let e in this._reports)this.loadReport(e)}loadReport(e){return this._reports[e].subscribe(r=>{this[`_${e}`].next(r)})}get day(){return this._day}get bestCustomers(){return this._bestCustomers}get bestCashiers(){return this._bestCashiers}get recentOrders(){return this._recentOrders}get weeksSummary(){return this._weeksSummary}}document.addEventListener("DOMContentLoaded",()=>{window.Dashboard=new n});
