1import N from"./D9o19SyG.js";import{s as K}from"./DUpiVuPC.js";import{_ as R}from"./DDmHrD2u.js";import{s as D}from"./BjK3ROqX.js";import{J as G,e as f,G as M,B as V,z as U,P as C,r as j,K as q,f as I,C as J,c,b as a,w as r,h as o,j as Q,m as z,i as v,a as n,k as W,Q as Y,q as Z,o as m,Y as h,t as p,d as y,Z as F,E as H,s as O,W as X}from"./DAqtiSCo.js";import{s as w}from"./C-gfMGFx.js";import{f as B}from"./CB-i4EzB.js";import"./Bz-QRu89.js";/* empty css */import"./DeAyzbXr.js";import"./fNCsqafC.js";const ee={style:{"overflow-y":"scroll"}},te={style:{display:"flex","justify-content":"space-between"}},oe={key:1,style:{"margin-bottom":"3rem"}},se={class:"subtitle"},le={key:0,style:{color:"#222"}},ne={style:{"text-decoration":"line-through"}},ae={style:{"margin-left":"5px"}},re={key:1},ie={style:{margin:"1rem"}},ke={__name:"discounts",setup(ue){const T=G(),g=f(()=>T.params.promo),_=W();f(()=>M(_.promos,t=>t.id===g.value));const b=f(()=>V(w(_.awards[g.value],[t=>t.rules.promoPoints||t.rules.minPoints]),t=>t.ordered>t.allocated));U(g,(t,e)=>{t&&!e&&Y(t)},{immediate:!0});const k=f(()=>V(b.value,t=>i.value?i.value==="wszystkie"||t.featuredLabel===i.value||H(t.categories,i.value):!0)),A=f(()=>{const t={},e={};return C(b.value,l=>{C(l.categories,u=>{t[u]?t[u]++:t[u]=1}),l.featured&&l.featuredLabel&&(e[l.featuredLabel]?e[l.featuredLabel]++:e[l.featuredLabel]=1)}),[{label:"wszystkie",count:b.value.length},...w(B(e,(l,u)=>({label:u,count:l}))),...w(B(t,(l,u)=>({label:u,count:l})))]}),i=j(null);q(()=>{_.pageTitle="Katalog nagród"}),I(()=>{_.pageTitle="Katalog nagród"});const s=j();return(t,e)=>{const l=N,u=K,L=R,x=D,S=J("PromoAwardsCatalogue"),P=O,$=X,E=Z;return m(),c("div",ee,[a(x,{inset:"",style:{margin:"1rem"}},{default:r(()=>[a(L,{list:o(A),modelValue:o(i),"onUpdate:modelValue":e[1]||(e[1]=d=>z(i)?i.value=d:null),clearable:!1,field:"label","label-width":"20px",placeholder:"wskaż kategoriÄ"},h({label:r(()=>[a(l,{name:"solar:filter-outline",size:"20"})]),item:r(({value:d})=>[n("div",te,[n("span",null,p(d.label),1),a(u,{round:"",size:"medium",style:{"min-width":"20px",display:"flex","justify-content":"center",padding:"0 5px"}},{default:r(()=>[y(p(d.count),1)]),_:2},1024)])]),_:2},[o(i)?{name:"extra",fn:r(()=>[a(l,{name:"solar:close-circle-line-duotone",size:"20",onClick:e[0]||(e[0]=d=>i.value=null)})]),key:"0"}:void 0]),1032,["list","modelValue"])]),_:1}),o(k)?(m(),Q(S,{key:0,awards:o(k),selected:o(s),"onUpdate:selected":e[2]||(e[2]=d=>z(s)?s.value=d:null)},null,8,["awards","selected"])):v("",!0),o(s)?(m(),c("div",oe,[e[7]||(e[7]=n("br",null,null,-1)),a(x,{inset:""},{default:r(()=>[a(P,null,{default:r(()=>e[3]||(e[3]=[n("p",{style:{"text-align":"left"}},"Do odbioru tej nagrody brakuje",-1)])),_:1}),a(P,{value:"punktów","value-class":"flex-grow"},{title:r(()=>[n("p",se,p(o(s).rules.promoPoints??o(s).rules.minPoints),1)]),_:1}),a($,null,{default:r(()=>[o(s).featuredTitle||o(s).rules.promoPoints?(m(),c("div",{key:0,class:"featured",style:F({background:o(s).featuredColor||"var(--van-warning-color"})},[o(s).rules.promoPoints?(m(),c("p",le,[e[5]||(e[5]=y(" Promocja: ")),n("span",ne,p(o(s).rules.minPoints),1),n("span",ae,[n("b",null,p(o(s).rules.promoPoints),1),e[4]||(e[4]=y(" pkt"))])])):(m(),c("p",re,p(o(s).featuredTitle),1))],4)):v("",!0)]),_:1})]),_:1}),n("div",ie,[a(E,{block:"",round:"",type:"primary"},{default:r(()=>e[6]||(e[6]=[y("Rejestruj paragony")])),_:1})]),e[8]||(e[8]=n("br",null,null,-1)),e[9]||(e[9]=n("br",null,null,-1))])):v("",!0)])}}};export{ke 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.