import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-Fn4MZzw6.js";import{q as t,bB as s,r as a,R as r,t as l,v as o,A as c,K as n,M as d,u as i}from"./vendor-core-Di0OO4oJ.js";import{I as u}from"./vendor-icons-ToTphQxd.js";import{f as p}from"./dashboard-Bj2OwIP9.js";const m={class:"flex flex-col gap-5 mb-5 max-sm:mb-4 h-105"},x={class:"flex items-center justify-between"},f={class:"text-lg font-medium text-gray-700"},v={class:"text-sm text-gray-400 mt-1"},h={class:"w-14 h-14 rounded-full bg-red-50 flex items-center justify-center text-red-500"},g={class:"mt-4 flex items-end"},w={class:"text-sm text-gray-500 ml-2 mb-2"},b={class:"flex items-center justify-between"},y={class:"text-lg font-medium text-gray-700"},k={class:"text-sm text-gray-400 mt-1"},_={class:"w-14 h-14 rounded-full bg-blue-50 flex items-center justify-center text-blue-500"},j={class:"mt-4 flex items-end"},C={class:"text-sm text-gray-500 ml-2 mb-2"},$=t({__name:"workplace-cards",setup(t){const $=s(),D=a(0),P=a(0),q=()=>{$.push("/order/complaint")},A=()=>{$.push("/product/approval")};return r(()=>{return e=null,t=null,s=function*(){try{const e=yield p();e&&(D.value=e.pending_complaints||0,P.value=e.pending_products||0)}catch(e){}},new Promise((a,r)=>{var l=e=>{try{c(s.next(e))}catch(t){r(t)}},o=e=>{try{c(s.throw(e))}catch(t){r(t)}},c=e=>e.done?a(e.value):Promise.resolve(e.value).then(l,o);c((s=s.apply(e,t)).next())});var e,t,s}),(t,s)=>{const a=e;return o(),l("div",m,[c("div",{class:"art-card flex-1 p-6 flex flex-col justify-center cursor-pointer hover:shadow-lg transition-shadow duration-300",onClick:q},[c("div",x,[c("div",null,[c("h3",f,n(t.$t("dashboard.workplace.workplaceCards.pendingComplaints")),1),c("p",v,n(t.$t("dashboard.workplace.workplaceCards.complaintsDesc")),1)]),c("div",h,[d(i(u),{icon:"ri:alarm-warning-line",class:"text-3xl"})])]),c("div",g,[d(a,{class:"text-4xl font-bold text-gray-800",target:D.value,duration:1e3},null,8,["target"]),c("span",w,n(t.$t("dashboard.workplace.workplaceCards.items")),1)])]),c("div",{class:"art-card flex-1 p-6 flex flex-col justify-center cursor-pointer hover:shadow-lg transition-shadow duration-300",onClick:A},[c("div",b,[c("div",null,[c("h3",y,n(t.$t("dashboard.workplace.workplaceCards.pendingProducts")),1),c("p",k,n(t.$t("dashboard.workplace.workplaceCards.productsDesc")),1)]),c("div",_,[d(i(u),{icon:"ri:shield-check-line",class:"text-3xl"})])]),c("div",j,[d(a,{class:"text-4xl font-bold text-gray-800",target:P.value,duration:1e3},null,8,["target"]),c("span",C,n(t.$t("dashboard.workplace.workplaceCards.units")),1)])])])}}});export{$ as _};
