1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="19aba476-d92d-5aef-a800-82974ab043c8")}catch(e){}}(); 3import{aP as W,be as D,a$ as F,bN as x,bh as l,aW as c,b4 as p,aS as m,b3 as g,aY as e,aZ as w,aX as o,aV as $,bi as S,bj as T,b9 as j,b5 as z,ch as k,aT as s,bp as A,ba as L,bm as q}from"./BV2unoxx.js";import{_ as H}from"./O0uNPEsQ.js";import{_ as K}from"./D7tEsMZB.js";import{u as O}from"./CNC8yLn2.js";import{f as C}from"./vdffv62z.js";import"./ASlsWfYF.js";const X={class:"are-container"},Y={class:"mb-m flex items-center gap-l"},Z=["textContent"],G=["textContent"],J={key:0,class:"mb-l text-accent-negative"},M={key:1,class:"space-y-l"},Q={key:2,class:"bg-gray-50 flex flex-col items-center justify-center rounded-lg border border-dashed border-gray-300 p-4xl text-center"},U={class:"mb-l rounded-full bg-gray-100 p-m"},ee={class:"text-xl text-gray-900 mb-s font-bold"},te={class:"mb-xl max-w-sm text-gray-600"},ie=W({__name:"index",async setup(ae){let a,i;const N=q({page:1}),u=D(),b=O(),d=F(),r=Array.isArray(u.params.eventId)?u.params.eventId[0]:u.params.eventId,{data:n}=([a,i]=x(()=>k(()=>`are-rewards-${r}`,()=>b.get(`/events/${r}/rewards`),"$rKNd5etf5N")),a=await a,i(),a),{data:f}=([a,i]=x(async()=>k("are-appruns-rewards-check",async()=>{const t=await b.get("/events",{query:{sort:"-updated_at",noPaginate:!0,hasActiveEvent:!0}});return C(t.data,!1)})),a=await a,i(),a),P=w(()=>(C(f.value)||[]).length>1),h=w(()=>(f.value?.find(y=>y.id===r)?.registrations||0)>=30);function B(t){N.value.page=t}return(t,y)=>{const R=j,v=z,I=H,E=K,V=L;return s(),l("div",X,[c("section",Y,[e(P)?(s(),m(R,{key:0,to:e(d)("/are/events"),color:"are-outline",size:"s",icon:"wr:arrow-left",title:t.$t("buttons.back")},null,8,["to","title"])):p("",!0),c("h1",{class:"text-1 font-bold uppercase text-secondary font-condensed",textContent:o(t.$t("navigation.marketing.rewards"))},null,8,Z),g(v,{disabled:!e(h),class:"ml-auto",to:e(d)(`/are/events/${e(r)}/rewards/create`)},{default:$(()=>[A(o(t.$t("buttons.create")),1)]),_:1},8,["disabled","to"])]),c("p",{class:"mb-xl",textContent:o(t.$t("labels.rewardsDescription"))},null,8,G),e(h)?p("",!0):(s(),l("p",J,o(t.$t("starterbag.notEnoughRegistrations")),1)),e(n)?.data?.length?(s(),l("section",M,[(s(!0),l(S,null,T(e(n).data,_=>(s(),m(I,{key:_.id,reward:_,link:e(d)(`/are/events/${e(r)}/rewards/${_.id}/edit`)},null,8,["reward","link"]))),128)),e(n)?.meta?(s(),m(E,{key:0,class:"mt-xl","allow-page-selection":!0,"current-page":e(n).meta.currentPage,total:e(n).meta.total,"last-page":e(n).meta.lastPage,"per-page":e(n).meta.perPage,onNavigate:B},null,8,["current-page","total","last-page","per-page"])):p("",!0)])):(s(),l("section",Q,[c("div",U,[g(V,{name:"material-symbols:featured-seasonal-and-gifts-outline-rounded",class:"size-2xl text-gray-400"})]),c("h2",ee,o(t.$t("labels.noRewardsFound")),1),c("p",te,o(t.$t("labels.noRewardsDescription")),1),g(v,{to:e(d)(`/are/events/${e(r)}/rewards/create`)},{default:$(()=>[A(o(t.$t("buttons.createFirstReward")),1)]),_:1},8,["to"])]))])}}});export{ie as default}; 4 5//# debugId=19aba476-d92d-5aef-a800-82974ab043c8
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.