1import{_ as z}from"./Du5jFYfy.js";import{_ as B}from"./5cbstzn2.js";import{_ as N}from"./EfJZ4vNC.js";/* empty css */import{e as S,h as L,D,k as T,c as l,a as t,b as a,w as A,l as i,t as e,F as H,E as U,m as V,g as E,r as p,o as m,G as F}from"./l_TsTgXO.js";import{u as I}from"./DjbRFztY.js";import{u as R}from"./CiChWwI0.js";import{u as $}from"./CJjc7OWG.js";import"./BALRyiGU.js";import"./l033NuO6.js";const G={class:"cl-root casino-point"},M={class:"relative z-30 mx-auto max-w-[800px] px-4 pb-28 pt-2"},O={class:"cl-nav"},j={class:"cl-page-title"},q={class:"cl-point-card mb-4"},J={class:"text-center"},K={class:"cl-point-label"},Q={class:"cl-point-amount"},W={class:"cl-info-note mb-6"},X={class:"cl-history-card"},Y={class:"cl-history-header"},Z={class:"flex items-center gap-2"},tt={class:"cl-history-title"},st={class:"cl-history-sub"},ot={class:"cl-history-list"},et={class:"flex items-center gap-3"},nt={class:"cl-history-item-title"},it={class:"cl-history-item-date"},at={key:0,class:"cl-empty-state"},gt=S({__name:"point",setup(ct){const{t:n,localeProperties:g}=L(),d=E(),{isLogin:y}=$(),x=I(),_=R(),{$swal:h}=D(),b=p(""),v=p(0),u=p([]);T(()=>{y()||d.push("/login"),x.getUser().then(s=>{s.status===200?b.value=s.message:s.status===401&&d.push("/login")}),_.getPoint().then(s=>{s.status===200&&(v.value=s.message?.Point||0,u.value=(s.pointLogs||[]).map(o=>({date:new Date(o.CreatedAt).toLocaleDateString(g.value.language||"th-TH",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),description:o.Type==="increase"?n("point.depositBonus"):n("point.converted"),amount:o.Type==="increase"?o.Point:-o.Point})))})});const k=async()=>{try{const s=await _.convertPoints();h.fire({title:"",text:s.message,icon:"success",customClass:{confirmButton:"bg-red-500"},preConfirm:()=>{window.location.reload()}})}catch(s){h.fire({title:"",text:s.response?._data?.message||n("common.errorOccurred"),icon:"error",customClass:{confirmButton:"bg-red-500"}})}};function f(s){return s.toLocaleString()}return(s,o)=>{const c=z,w=B,C=N;return m(),l("div",G,[o[1]||(o[1]=t("div",{class:"cl-diamond-pattern"},null,-1)),o[2]||(o[2]=t("div",{class:"cl-glow-orb"},null,-1)),t("div",M,[t("nav",O,[a(w,{to:"/",class:"cl-back-btn","aria-label":i(n)("common.back")},{default:A(()=>[a(c,{name:"i-heroicons-arrow-left",class:"size-5"})]),_:1},8,["aria-label"]),t("h3",j,e(i(n)("point.title")),1),a(C)]),t("div",q,[o[0]||(o[0]=t("div",{class:"cl-neon-edge"},null,-1)),t("div",J,[t("p",K,e(i(n)("point.balance")),1),t("p",Q,e(f(v.value)),1),t("button",{class:"cl-convert-btn",onClick:k},[a(c,{name:"i-heroicons-gift",class:"size-5"}),t("span",null,e(i(n)("point.convert")),1)])])]),t("div",W,[a(c,{name:"i-heroicons-information-circle",class:"size-5"}),t("span",null,e(i(n)("point.depositNote")),1)]),t("div",X,[t("div",Y,[t("div",Z,[a(c,{name:"i-heroicons-gift",class:"cl-history-icon size-5"}),t("h3",tt,e(i(n)("point.history")),1)]),t("div",st,e(i(n)("common.latestRecords",{count:10})),1)]),t("div",ot,[(m(!0),l(H,null,U(u.value,(r,P)=>(m(),l("div",{key:P,class:"cl-history-item"},[t("div",et,[a(c,{name:"i-heroicons-check-circle",class:"size-6 text-green-500"}),t("div",null,[t("p",nt,e(r.description),1),t("p",it,e(r.date),1)])]),t("p",{class:F(["cl-history-item-amount",r.amount>=0?"text-green-500":"text-orange-500"])},e(r.amount>=0?"+":"")+e(f(r.amount)),3)]))),128))]),u.value.length===0?(m(),l("div",at,e(i(n)("point.noHistory")),1)):V("",!0)])])])}}});export{gt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.