1import{d as C,a6 as g,b as T,u as Y,az as E,g as w,y as F,a7 as M,r as _,B as D,e as L,f as $,o as d,c as m,a,F as Q,h as U,n as f,k as c,A as W,t as o,j as b,s as A,_ as H,W as q,i as k,Y as G,a8 as J}from"./index-0c2fc791.js";const B="/assets/NoData-1689f007.webp",K={key:0,class:"grid grid-cols-12 gap-[1rem]"},O=["onClick"],P=["src"],X={class:"text-[12px] md:text-[14px] lg:text-[16px] font-[500]"},Z={class:"text-[10px] md:text-[12px]"},ee={class:"md:px-[2rem] px-[0.75rem]"},te={class:"title-text text-center w-[50%] mx-auto border-b-[1px] px-[0.75rem] pb-[0.5rem] pt-[1rem] md:p-[1rem] text-[20px] md:text-[25.6px]"},ae={class:"text-[14px] md:text-[16px] font-[500] text-center my-[1rem] md:my-[2rem]"},se={class:"text-[12px] md:text-[14px] font-[500] text-center my-[1rem] md:my-[2rem]"},le={class:"flex justify-center gap-[1rem] mb-[1rem]"},ne={class:"mt-[1rem]"},oe={key:1,class:"bg-[#0000006c] h-full w-full rounded-[1rem] flex flex-col items-center justify-center"},re={class:"mt-[1rem] text-lg-[16px] text-[14px]"},ce=C({__name:"ItemBox",setup(V){g.locale("th");const h=T(),{t:s}=Y(),u=E(),v=w(()=>{const{notify:n}=u;return n}),y=w(()=>{const{username:n}=h.data;return n});F(v,()=>e.value=v.value);const N=M(),e=_(),i=D(),l=_(99999),x=_(!1);L(()=>{I()}),$(async()=>{e.value=e.value.filter(n=>n.is_read===!1),u.setNewdata(e.value,y.value)});function S(){i.widthReset(),i.setTitle(""),i.widthReset(),N.setContent(""),i.setCompo(""),j()}function j(){e.value[l.value].channel==="ticket"?(i.setCompo("EventView"),i.dataQuery("RandomBoxView")):e.value[l.value].channel==="bonus_free"&&(i.setCompo("EventView"),i.dataQuery("CreditFreeView"))}function I(){e.value=v.value.sort(n=>n.is_read===!1?-1:1),u.sortData()}function R(){A.success("ลà¸à¸à¸à¸«à¸¡à¸²à¸¢à¹à¸¥à¹à¸§"),e.value=e.value.filter((n,t)=>{if(t!==l.value)return n}),l.value=99999,x.value=!1}async function z(n){l.value=n,x.value=!0,e.value=e.value.map((t,r)=>{let p;return n===r||t.is_read?p=!0:p=!1,{...t,is_read:p}}),u.setLengthtData(e.value)}return window.addEventListener("beforeunload",()=>(u.setNewdata(e.value,y.value),"")),(n,t)=>e.value&&e.value.length?(d(),m("div",K,[a("div",{class:f(["landscape:col-span-12 landscape:md:col-span-4 col-span-12 sm:col-span-4 overflow-auto h-[calc(50vh-14px)] landscape:flex landscape:flex-col landscape:gap-[0.5rem]",[x.value?"landscape:hidden hidden sm:block landscape:md:block landscape:lg:grid":"",e.value.length<=3?"landscape:lg:h-[fit-content]":e.value.length<=4?" landscape:xl:!h-[fit-content]":" landscape:xl:h-[calc(50vh-14px)]"]])},[(d(!0),m(Q,null,U(e.value,(r,p)=>(d(),m("div",{key:p,class:f(["h-[fit-content] cursor-pointer hover:brightness-95 menu-deposit-Bgcolor p-[0.25rem] lg:p-[0.5rem] flex items-center gap-[0.5rem] md:gap-[0.25rem] lg:gap-[0.5rem] rounded-[1rem] my-[0.5rem] lg:my-[0.5rem] first:mt-0 last:mb-0 landscape:first:my-[0.5rem] landscape:w-[calc(50%-0.25rem)] landscape:flex landscape:!my-[0rem] landscape:md:my-[0.5rem] md:landscape:w-[100%]",[p===l.value?"active ":"",r.is_read?"opacity-[0.5]":""]]),onClick:ie=>z(p)},[a("img",{loading:"lazy",src:c(W)(`mail/${r.status}.png`),class:"w-[40px] md:w-[45px] lg:w-[60px] h-[40px] md:h-[45px] lg:h-[60px]",alt:""},null,8,P),a("div",null,[a("h5",X,o(r.description.slice(0,30)+"..."),1),a("small",Z,o(c(g)(r.start_notify).locale("TH").format("DD MMMM YYYY")),1)])],10,O))),128))],2),l.value!==99999&&e.value.length?(d(),m("div",{key:0,class:f(["col-span-12 md:col-span-8 bg-[#0000006c] rounded-[1rem] h-[calc(50vh-14px)] flex-col justify-between overflow-auto",x.value?"flex ":"hidden md:flex"])},[a("div",ee,[a("h3",te,o(c(s)("mailBox.system")),1),a("h4",ae,o(e.value[l.value].description),1),a("h5",se,o(e.value[l.value].detail),1)]),a("div",le,[["ticket","bonus_free"].includes(e.value[l.value].channel)?["ticket","bonus_free"].includes(e.value[l.value].channel)?(d(),m("button",{key:1,class:"text-[12px] md:text-[14px] primary-button w-[40%] px-[0.5rem] md:px-[1rem] py-[0.3rem] rounded-[0.75rem] md:w-[35%]",onClick:t[1]||(t[1]=r=>S())},o(e.value[l.value].channel==="ticket"?`${c(s)("mailBox.goRandomBox")}`:`${c(s)("mailBox.goBonus")}`),1)):b("",!0):(d(),m("button",{key:0,class:"text-[12px] md:text-[14px] primary-button w-[40%] px-[0.5rem] md:px-[1rem] py-[0.3rem] rounded-[0.75rem] md:w-[35%] md:hidden",onClick:t[0]||(t[0]=r=>x.value=!1)},o(c(s)("mailBox.confirm")),1)),a("button",{onClick:t[2]||(t[2]=r=>R()),class:"text-[12px] md:text-[14px] secondary-button w-[40%] px-[0.5rem] md:px-[1rem] py-[0.3rem] rounded-[0.75rem] md:w-[35%]"},o(c(s)("mailBox.delete")),1)])],2)):l.value===99999&&e.value.length?(d(),m("div",{key:1,class:f(["col-span-12 md:col-span-8 bg-[#0000006c] rounded-[1rem] h-[calc(50vh-14px)] flex-col",x.value?"flex ":"hidden md:flex justify-center items-center"])},[t[3]||(t[3]=a("img",{loading:"lazy",src:B,alt:"",class:"w-[150px] h-[100px] opacity-[0.5] ]"},null,-1)),a("h5",ne,o(c(s)("mailBox.chooseMail")),1)],2)):b("",!0)])):(d(),m("div",oe,[t[4]||(t[4]=a("img",{loading:"lazy",src:B,alt:"",class:"w-[150px] h-[100px] opacity-[0.5] ] landscape:w-[75px] landscape:h-[50px] landscape:md:w-[150px] landscape:md:h-[100px]"},null,-1)),a("h5",re,o(c(s)("mailBox.noMail")),1)]))}});const de=H(ce,[["__scopeId","data-v-6135a2e6"]]),me={class:"h-[50vh] px-[1px] py-[6px]"},ue=C({__name:"MailView",setup(V){const h=M(),s=D();return q(async()=>{s.setWidth("750px"),s.setTitle("mail")}),$(()=>{s.widthReset(),s.setTitle(""),s.widthReset(),h.setContent("")}),(u,v)=>(d(),m("div",me,[k(J,{name:"fade",mode:"out-in",appear:""},{default:G(()=>[k(de)]),_:1})]))}});
1export{ue 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.