import{_ as g}from"./AdminLayout.vue_vue_type_script_setup_true_lang-CE8oEe4m.js";import{d as w,q as f,c as l,o,a as n,b as s,u as d,m as v,h as r,t as i,F as m,p as c,g as p}from"./app-DJb_CRLj.js";import{_ as b}from"./Files.vue_vue_type_script_setup_true_lang-CRYWsXWh.js";import{u}from"./useNumberFormat-Bu1g0G_b.js";import{_ as h}from"./FilterList.vue_vue_type_script_setup_true_lang-CCLhEmVl.js";import"./simplebar.min-CZ5saGqI.js";import"./debounce-CDPmhVE8.js";import"./useToastify-DqLaHt3f.js";import"./coloris-DdyWondq.js";/* empty css                             *//* empty css              */import"./Pagination.vue_vue_type_script_setup_true_lang-9skHAHfw.js";import"./SearchList.vue_vue_type_script_setup_true_lang-CyAiOusi.js";import"./useCopyToClipboard-CrZ6pkmz.js";import"./useRandomNum-BTw6623a.js";const $={class:"container-fluid"},y={class:"product-list list mb-4"},k={class:"card"},V={class:"card-body"},N={class:"d-flex fw-bold fs-6 lts-05 mb-3"},S={class:"table-responsive mb-4"},B={class:"table",style:{"min-width":"900px"}},D={class:"first-small"},F={class:"first-small white-space-nowrap"},j={class:"first-small white-space-nowrap"},C=["src","alt"],q=["href"],E={key:0,class:"ri-star-s-fill vip-product"},I={class:"first-small white-space-nowrap"},L={class:"first-small white-space-nowrap"},P={key:0,class:"product-list-empty"},z={class:"lts-05"},A={class:"product-list list mb-4"},G={class:"card"},H={class:"card-body"},J={class:"d-flex fw-bold fs-6 lts-05 mb-3"},K={class:"table-responsive mb-4"},M={class:"table",style:{"min-width":"900px"}},O={class:"first-small"},Q={class:"first-small white-space-nowrap"},R={class:"first-small white-space-nowrap"},T=["src","alt"],U=["href"],W={key:0,class:"ri-star-s-fill vip-product"},X={class:"first-small white-space-nowrap"},Y={class:"first-small white-space-nowrap"},Z={key:0,class:"product-list-empty"},x={class:"lts-05"},gs=w({layout:g,__name:"Products",props:{productsSales:{},productsVisit:{}},setup(ss){return(t,a)=>{const _=f("tooltip");return o(),l(m,null,[n(d(v),{title:t.$t("messages.title.products_statistics")},null,8,["title"]),s("div",$,[n(b,{title:t.$t("messages.sentence.products_statistics")},null,8,["title"]),s("div",y,[s("div",k,[s("div",V,[s("div",N,i(t.$t("messages.sentence.x_most_sales_products",{count:"10"})),1),a[0]||(a[0]=s("div",{class:"border mb-3"},null,-1)),n(h,{filters:{sale_today:t.$t("messages.word.today"),sale_week:t.$t("messages.word.week"),sale_month:t.$t("messages.word.month")}},null,8,["filters"]),s("div",S,[s("table",B,[s("thead",null,[s("tr",null,[s("th",D,i(t.$t("messages.word.image")),1),s("th",null,i(t.$t("messages.word.title")),1),s("th",F,i(t.$t("messages.sentence.sales_count")),1),s("th",j,i(t.$t("messages.word.last_update")),1)])]),s("tbody",null,[(o(!0),l(m,null,c(t.productsSales,e=>(o(),l("tr",{key:e.id},[s("td",null,[s("img",{class:"br-10",width:"35",height:"35",src:e.get_images[0].link,alt:e.get_images[0].alt},null,8,C)]),p((o(),l("td",null,[s("a",{class:"product-title product-title-min-300",href:t.route("main.products.show",e.slug),target:"_blank"},i(e.title),9,q),e.is_vip?(o(),l("i",E)):r("",!0)])),[[_,e.is_vip?t.$t("messages.sentence.vip_product"):null,void 0,{top:!0}]]),s("td",I,i(e.consignment_items_count!=null?d(u)(e.consignment_items_count):0),1),s("td",L,i(e.jalali_updated_at[2]),1)]))),128))])])]),t.productsSales.length==0?(o(),l("div",P,[s("div",z,i(t.$t("messages.sentence.no_items_found")),1)])):r("",!0)])])]),s("div",A,[s("div",G,[s("div",H,[s("div",J,i(t.$t("messages.sentence.x_most_viewed_products",{count:"10"})),1),a[1]||(a[1]=s("div",{class:"border mb-3"},null,-1)),n(h,{filters:{visit_today:t.$t("messages.word.today"),visit_week:t.$t("messages.word.week"),visit_month:t.$t("messages.word.month")}},null,8,["filters"]),s("div",K,[s("table",M,[s("thead",null,[s("tr",null,[s("th",O,i(t.$t("messages.word.image")),1),s("th",null,i(t.$t("messages.word.title")),1),s("th",Q,i(t.$t("messages.word.view")),1),s("th",R,i(t.$t("messages.word.last_update")),1)])]),s("tbody",null,[(o(!0),l(m,null,c(t.productsVisit,e=>(o(),l("tr",{key:e.id},[s("td",null,[s("img",{class:"br-10",width:"35",height:"35",src:e.get_images[0].link,alt:e.get_images[0].alt},null,8,T)]),p((o(),l("td",null,[s("a",{class:"product-title product-title-min-300",href:t.route("main.products.show",e.slug),target:"_blank"},i(e.title),9,U),e.is_vip?(o(),l("i",W)):r("",!0)])),[[_,e.is_vip?t.$t("messages.sentence.vip_product"):null,void 0,{top:!0}]]),s("td",X,i(d(u)(parseInt(e.view_count))),1),s("td",Y,i(e.jalali_updated_at[2]),1)]))),128))])])]),t.productsVisit.length==0?(o(),l("div",Z,[s("div",x,i(t.$t("messages.sentence.no_items_found")),1)])):r("",!0)])])])])],64)}}});export{gs as default};
