import{_ as h,f as n,o as l,v as m,w as i,i as e,h as c,t as s,g as _,k as v,p as r,F as N,I as $,J as b}from"./app-ff872a97.js";const w={data:()=>({loading:!0,currentPage:1,totalPages:1,notifications:[]}),methods:{async fetNotification(t){const a=await this.call_api("get",`user/all-notification?page=${t}`);a.status==200?(this.notifications=a.data.data.data,this.totalPages=a.data.data.total,this.currentPage=a.data.data.current_page):this.snack({message:this.$i18n.t("something_went_wrong"),color:"red"}),this.loading=!1},openOrderDetails(t){this.$router.push({name:"OrderDetails",params:{code:t}})}},created(){this.fetNotification()}},k=t=>($("data-v-049af33e"),t=t(),b(),t),y={class:"mt-4"},D={class:"fs-21 fw-700 opacity-80 mb-5"},P={class:"py-4"},V=["onClick"],x=k(()=>e("br",null,null,-1)),I={class:"text-start"};function S(t,a,B,C,O,d){const u=n("v-pagination"),p=n("v-card-text"),f=n("v-card"),g=n("v-col");return l(),m(g,null,{default:i(()=>[e("div",y,[c(f,{class:"mx-auto"},{default:i(()=>[c(p,null,{default:i(()=>[e("h1",D,s(t.$t("all_notifications")),1),(l(!0),_(N,null,v(t.notifications,(o,F)=>(l(),_("div",null,[e("ul",null,[e("li",P,[r(s(t.$t("order_code"))+": ",1),e("a",{onClick:J=>d.openOrderDetails(o.data.order_code)},s(o.data.order_code),9,V),r(" "+s(t.$t(" has been "))+" ",1),e("b",null,s(o.data.status),1),r(),x,e("b",null,s(new Date(o.created_at).toJSON().slice(0,10).split("-").reverse().join("-")),1)])])]))),256)),e("div",I,[c(u,{modelValue:t.currentPage,"onUpdate:modelValue":[a[0]||(a[0]=o=>t.currentPage=o),d.fetNotification],length:t.totalPages,"prev-icon":"las la-angle-left","next-icon":"las la-angle-right","total-visible":4,elevation:"0",class:"my-4"},null,8,["modelValue","onUpdate:modelValue","length"])])]),_:1})]),_:1})])]),_:1})}const j=h(w,[["render",S],["__scopeId","data-v-049af33e"]]);export{j as default};
