1import{j as o}from"./vendor-react.ELhBuE2q.js";import{z as B,f as m,G as x,a7 as D,W as I}from"./app-shared.CdUkAbk4.js";import{S as f}from"./TextBox.D9WGVcEh.js";import{u as T}from"./usePromotion.CswUxPAO.js";import"./vendor-ui.BSTRh9Ug.js";import"./vendor-i18n.DvM0XvO9.js";import"./vendor-router.aN8wpDPU.js";import"./vendor-moment.BLMuvzoS.js";import"./vendor-axios.NIGUFBhG.js";import"./purify.es.CEVJ7K31.js";import"./promotionClaim.CmK_ncch.js";function q({dataEvent:$,onClose:w}){const{user:h,isModal:F,promotion:_,t:a,PromotionDetial:g,goToDetail:b,BtnClaimPromotion:u}=T({dataEvent:$,onClose:w}),t=B();function j({label:e}){return o.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",fontSize:"10px",fontWeight:"700",letterSpacing:"0.08em",color:"#FFFFFF",background:`linear-gradient(135deg, ${t}A6 0%, rgba(var(--c-accent-700-rgb, 26, 143, 168), 0.85) 100%)`,borderRadius:"3px 10px 3px 10px",border:`1px solid ${t}D9`,boxShadow:`0 0 8px ${t}73`,textTransform:"uppercase",fontFamily:"Prompt"},children:e})}function z({value:e,suffix:i}){return o.jsx("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"4px 12px",background:"radial-gradient(circle at 35% 30%, rgba(60,130,180,0.95) 0%, rgba(var(--c-secondary-700-rgb, 15, 30, 60), 0.98) 70%)",border:`1px solid ${t}D9`,borderRadius:"8px 2px 8px 2px",boxShadow:`0 0 12px ${t}8C, inset 0 0 6px ${t}4D`,fontFamily:"Prompt"},children:o.jsxs("span",{style:{fontSize:"16px",fontWeight:"800",lineHeight:"1",color:t,textShadow:`0 0 6px ${t}B3`},children:["+",e,o.jsx("span",{style:{fontSize:"11px",marginLeft:"2px"},children:i})]})})}function P({current:e,total:i}){const n=Math.max(0,Math.min(i||0,8)),s=Math.max(0,Math.min(e||0,n));return o.jsxs("div",{className:"flex items-center gap-1",children:[Array.from({length:n}).map((c,l)=>o.jsx("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:l<s?t:`${t}2E`,boxShadow:l<s?`0 0 6px ${t}D9`:"none"}},l)),o.jsxs("span",{style:{marginLeft:"6px",fontSize:"11px",fontWeight:"700",color:"#E8F4FF",fontFamily:"Prompt"},children:[s,"/",n]})]})}function p({label:e}){return o.jsxs("div",{className:"flex items-center gap-2",style:{margin:"4px 0 2px 0",fontSize:"10px",fontWeight:"700",color:`${t}D9`,letterSpacing:"0.12em",textTransform:"uppercase",fontFamily:"Prompt",textShadow:`0 0 4px ${t}66`},children:[o.jsx("span",{style:{width:"12px",height:"1px",background:`${t}B3`,boxShadow:`0 0 3px ${t}80`}}),o.jsx("span",{children:e})]})}function y({item:e,user:i,t:n,PromotionDetial:s,goToDetail:c,BtnClaimPromotion:l}){var N;const r=e.prom_mode==1,v=e.prom_mode==2,k=(i==null?void 0:i.prom_id)==e.id&&((N=i==null?void 0:i.customer)==null?void 0:N.prom_series_count)||0,S=e.prom_bonus_type_index==2?n("baht"):"%",d=parseInt(e.series_bonus)||0;return o.jsxs(m,{styleName:"bg_card_list_promotion_hologram",className:"relative overflow-hidden",children:[o.jsx(x,{position:"tl",offset:4,size:10,strokeWidth:1.3,opacity:.85}),o.jsx(x,{position:"tr",offset:4,size:10,strokeWidth:1.3,opacity:.85}),o.jsx(x,{position:"bl",offset:4,size:10,strokeWidth:1.3,opacity:.85}),o.jsx(x,{position:"br",offset:4,size:10,strokeWidth:1.3,opacity:.85}),o.jsx("div",{className:"pointer-events-none absolute -top-px left-[12%] right-[12%] h-[1px] z-[2]","aria-hidden":"true",style:{background:`linear-gradient(90deg, transparent, ${t}F2, transparent)`,boxShadow:`0 0 8px ${t}99`}}),e.image&&o.jsxs("div",{className:"relative w-full flex justify-center items-center",children:[o.jsx("img",{loading:"lazy",decoding:"async",className:"default_img_card_list_promotion_hologram cursor-pointer",onClick:()=>c(e),src:D(e.image),style:{display:"block",margin:"0 auto",maxWidth:"100%",maxHeight:"260px",objectFit:"contain"}}),o.jsxs("div",{className:"absolute",style:{top:"8px",left:"8px",zIndex:2},children:[r&&o.jsx(j,{label:n("continuous_promotion_type")}),v&&o.jsx(j,{label:n("specific_game")})]}),d>0&&o.jsx("div",{className:"absolute",style:{top:"8px",right:"8px",zIndex:2},children:o.jsx(z,{value:d,suffix:S})})]}),o.jsxs("div",{className:"flex flex-col gap-1 text-left w-full p-2",children:[o.jsx(f,{styleName:"text_detail_promotion_hologram",className:"default_text_detail_m_promotion_hologram w-fit",label:e.name}),o.jsx("div",{className:"default_text_detail_d_promotion_hologram",children:o.jsx(s,{data:e})}),r&&o.jsxs(o.Fragment,{children:[o.jsx(p,{label:n("continuous_promotion_type")}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{style:{fontSize:"12px",color:"rgba(232,244,255,0.85)",fontFamily:"Prompt"},children:[e.series_num," ",n("times")]}),(i==null?void 0:i.prom_id)==e.id&&o.jsx(P,{current:k,total:parseInt(e.series_num)||0})]})]}),r&&o.jsxs(o.Fragment,{children:[o.jsx(p,{label:n("extra_bonus")}),o.jsx("div",{style:{fontSize:"13px",fontWeight:"700",color:t,fontFamily:"Prompt",textShadow:`0 0 4px ${t}80`},children:`+${d} ${S}`})]}),r&&(i==null?void 0:i.prom_id)==e.id&&(i==null?void 0:i.prom_end_series_bonus)&&e.prom_bonus_type_index==1&&o.jsxs(o.Fragment,{children:[o.jsx(p,{label:n("extra_bonus")}),o.jsx("div",{style:{fontSize:"13px",fontWeight:"700",color:t,fontFamily:"Prompt"},children:`${i==null?void 0:i.prom_end_series_bonus} ${n("baht")}`})]}),e.prom_bonus_type_index==1&&r&&o.jsxs("div",{style:{fontSize:"10px",color:"rgba(232,244,255,0.55)",fontStyle:"italic",fontFamily:"Prompt"},children:["(",n("bonus_increases_with_deposit")," ",e.series_bonus," %)"]}),v&&o.jsxs(o.Fragment,{children:[o.jsx(p,{label:n("specific_game")}),o.jsx("div",{className:"flex flex-wrap gap-1",children:(e.game_specific?JSON.parse(e.game_specific):[]).map((C,W)=>o.jsx("span",{style:{fontSize:"10px",fontWeight:"600",color:t,background:`${t}1F`,border:`1px solid ${t}66`,borderRadius:"3px 8px 3px 8px",padding:"2px 8px",fontFamily:"Prompt"},children:C},W))})]}),o.jsxs("div",{className:"default_layout_btn_card_list_promotion_hologram flex flex-col gap-2 mt-2 [&_button]:!w-full [&_button]:!h-auto [&_button]:!min-h-[40px] [&_button]:!px-4 [&_button]:!py-2 [&_button]:!whitespace-nowrap",children:[o.jsx(I,{onClick:()=>c(e),styleName:"btn_condition_promotion_hologram",children:n("condition")}),o.jsx(l,{item:e})]})]})]})}return F?o.jsxs("div",{className:"p-5 min-w-[340px] min-h-[260px]",children:[o.jsxs("div",{className:"mt-5 flex items-center justify-center gap-2",children:[o.jsx("span",{style:{color:t,fontSize:"16px"},children:"â"}),o.jsx(f,{styleName:"text_title_promotion_hologram",label:a("you_received_bonus")}),o.jsx("span",{style:{color:t,fontSize:"16px"},children:"â"})]}),o.jsx("div",{className:"my-3 text-center",style:{fontSize:"12px",color:"rgba(232,244,255,0.65)",fontFamily:"Prompt"},children:a("can_claim_only_one_promotion")}),o.jsx("div",{className:"flex flex-col gap-3",children:_.map((e,i)=>o.jsx(y,{item:e,user:h,t:a,PromotionDetial:g,goToDetail:b,BtnClaimPromotion:u},`promotion_modal_${i}`))})]}):o.jsx(m,{styleName:"bg_layout_promotion_hologram",className:"relative",children:o.jsxs("div",{className:"relative w-full max-w-[768px]",children:[o.jsx("div",{className:"pointer-events-none absolute rounded-full",style:{to
1p:"-60px",right:"-60px",width:"180px",height:"180px",background:`radial-gradient(circle, ${t}52 0%, transparent 70%)`,filter:"blur(22px)",zIndex:0}}),o.jsxs("div",{className:"relative flex flex-col items-center w-full",children:[o.jsxs("div",{className:"self-start w-full",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[o.jsx("span",{style:{color:t,fontSize:"14px"},children:"â"}),o.jsx(f,{styleName:"text_title_promotion_hologram",label:a("promotion")})]}),o.jsx("div",{style:{width:"80px",height:"2px",background:`linear-gradient(90deg, ${t}F2 0%, ${t}00 100%)`,margin:"0 0 16px 0",boxShadow:`0 0 6px ${t}80`}})]}),o.jsx(m,{styleName:"bg_layout_card_list_promotion_hologram",className:"flex flex-col gap-3 w-full",children:_.map((e,i)=>o.jsx(y,{item:e,user:h,t:a,PromotionDetial:g,goToDetail:b,BtnClaimPromotion:u},`promotion_${i}`))})]})]})})}export{q 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.