1import{_ as $,a as D,b as A}from"./iCyLM4LW.js";import{d as q,au as M,av as j,aw as S,r as p,ax as T,K as O,ay as E,o as k,c as C,a as c,f as x,g as R,h as t,q as F,b as i,p as f,t as h,H as N,az as H,aA as Q,e as w,w as L,P as K,F as G,I,B as J,M as W,a9 as X,J as z}from"./zGN25SIG.js";import{C as Y}from"./qF8I_tPr.js";import"./BmwrrxPv.js";import"./CTTOQ1fF.js";const Z={class:"relative flex flex-col items-center rounded-[12px] w-full h-full p-6 pt-0 bg-[linear-gradient(0deg,#171516_0%,#61615F_100%)]"},ee=["src"],te={class:"text-white text-[16px] font-semibold -mt-3 mb-2"},ae={class:"text-[#E3BB72] text-[14px] text-center w-full mb-6"},se={class:"flex w-full"},ie=["src"],oe=["src"],le=q({__name:"UquizUnClaimRewardDialog",props:{modelValue:{},modelModifiers:{}},emits:M(["opened","confirm","cancel"],["update:modelValue"]),setup(y,{emit:m}){const o=j(y,"modelValue"),u=m,l=S(document.body),{isRevealed:d,reveal:g,confirm:b,cancel:e,onReveal:n,onConfirm:r,onCancel:_}=E(),a=p(0),v=T(a,{duration:300,transition:[.75,0,.25,1]});O(o,s=>{s&&(g(),l.value=!0)});function B(){a.value=0,setTimeout(()=>{b(),o.value=!1,l.value=!1},300)}function P(){a.value=0,setTimeout(()=>{e(),o.value=!1,l.value=!1},300)}return k(()=>{n(()=>{a.value=1,u("opened")}),r(()=>{u("confirm"),o.value=!1}),_(()=>{u("cancel"),o.value=!1})}),(s,U)=>(c(),C(H,{to:"body"},[t(d)?(c(),x("div",{key:0,style:F({opacity:t(v)}),class:"fixed flex justify-center items-center top-0 right-0 h-screen w-screen bg-black bg-opacity-50",onClick:P},[i("div",{class:"flex rounded-[13px] w-[calc(100vw-16px)] min-w-[300px] max-w-[386px] p-[1px] bg-[linear-gradient(135deg,rgba(247,199,151,0.3)_0%,#FBDEB2_50%,rgba(247,199,151,0.3)_100%)]",onClick:U[0]||(U[0]=V=>V.stopPropagation())},[i("div",Z,[i("img",{src:("getPublicUrl"in s?s.getPublicUrl:t(f))("/images/uquiz/icn-un-claim.svg"),class:"size-[200px] object-contain -mt-[100px]"},null,8,ee),i("div",te,h(s.$t("uquiz.history.unclaim.title")),1),i("div",ae,h(s.$t("uquiz.history.unclaim.description")),1),i("div",se,[i("button",{class:"relative w-full text-[#0A0425] text-[16px] font-bold py-3 rounded-2xl border border-[#ECCA77] bg-[linear-gradient(to_right,#966B2A_0%,#FCDD9A_50%,#8B6832_100%)]",onClick:B},[i("img",{src:("getPublicUrl"in s?s.getPublicUrl:t(f))("/images/uquiz/bg-btn-l.svg"),class:"absolute w-[35%] h-full top-0 left-0 object-contain object-left-top"},null,8,ie),i("img",{src:("getPublicUrl"in s?s.getPublicUrl:t(f))("/images/uquiz/bg-btn-r.svg"),class:"absolute w-[35%] h-full bottom-0 right-0 object-contain object-left-bottom"},null,8,oe),N(" "+h(s.$t("btn.OK")),1)])])])])],4)):R("",!0)]))}}),ne=Object.assign(le,{__name:"UquizUnClaimRewardDialog"}),ue={class:"bg-black"},re=["src"],ge=q({__name:"index",setup(y){const m=Q(),o=p([]),u=p(!1),l=p(!1);async function d(){const e=await z.uquizGetActiveQuizByOrg();e.succ?o.value=e.data?.rows:m.error(e.msg,{timeout:2e3})}async function g(e,n){if(u.value)return;u.value=!0;const r=await z.uquizUserVoteQuiz(e,n);r.succ||m.error(r.msg,{timeout:2e3}),await d(),u.value=!1}async function b(){const e=await z.uquizUserUnClaimReward();e.succ?e.data?.totalReward>0&&(l.value=!0):m.error(e.msg,{timeout:2e3})}return k(()=>{d(),b()}),(e,n)=>{const r=$,_=ne;return c(),x("div",ue,[w(Y,{"menu-link":t(K).HOME},{title:L(()=>[i("img",{src:("getPublicUrl"in e?e.getPublicUrl:t(f))("/images/uquiz/uquiz-title.svg")},null,8,re)]),_:1},8,["menu-link"]),w(r,{"active-tab":"index"}),i("div",{class:J([{"-mt-10 !pt-10":t(o).length===1},"p-4 pt-0 min-h-[calc(100vh-179px)]"])},[t(o).length===0?(c(),C(D,{key:0,title:e.$t("uquiz.empty.title"),description:e.$t("uquiz.empty.description")},null,8,["title","description"])):R("",!0),(c(!0),x(G,null,I(t(o),a=>(c(),C(A,{key:a._id,quiz:a,onSelect:v=>g(a._id,v)},null,8,["quiz","onSelect"]))),128))],2),w(_,{modelValue:t(l),"onUpdate:modelValue":n[0]||(n[0]=a=>X(l)?l.value=a:null),onConfirm:n[1]||(n[1]=a=>("useRouter"in e?e.useRouter:t(W))().push({name:"uQuiz-history"}))},null,8,["modelValue"])])}}});export{ge 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.