1import{r as l,j as t}from"./vendor-react-BGN68_Lp.js";import{g as n}from"./vendor-styled-pkIKgjgv.js";import{J as v,K as z,x as k,g as r,c,b as f,s as M}from"./index-uear5Vpj.js";import{a as S,u as L}from"./vendor-redux-D8sX5Eqv.js";import{Confirmation as A}from"./MultiActions-DnPEd66X.js";import{u as R}from"./vendor-i18n-BWleq_Sd.js";import"./vendor-socket-DSYo_sTV.js";import"./vendor-router-CYD8mbvC.js";const B=n.div` 2 display: flex; 3 align-items: center; 4 justify-content: center; 5 margin-top: 40px; 6 7 & > img { 8 margin: 0 52px; 9 } 10`,m=n.div` 11 display: inline-flex; 12 align-items: center; 13 14 img { 15 width: 42px; 16 height: 48px; 17 } 18 19 span { 20 font-family: 'Robustik'; 21 font-size: 24px; 22 position: absolute; 23 left: 50%; 24 top: 45%; 25 transform: translate(-50%, -50%); 26 } 27`,I=n(m)` 28 img { 29 width: 50px; 30 } 31 32 span { 33 top: 35%; 34 } 35`,N=n.input` 36 padding: 18px; 37 border-radius: 8px; 38 background: rgba(93, 108, 146, 0.05); 39 color: #9fb1c9; 40 font-size: 15px; 41 margin-top: 24px; 42`,h=n.p` 43 color: #b6c0d0; 44 text-align: center; 45 font-size: 15px; 46 line-height: 150%; 47 margin-top: 12px; 48 margin-bottom: 16px; 49`,H=n.div` 50 width: 500px; 51 border-radius: 15px; 52 background: #171c2a; 53 padding: 40px; 54 55 &.sm { 56 width: 450px; 57 padding: 46px 43px; 58 59 h2 { 60 font-size: 20px; 61 } 62 63 ${h} { 64 color: #adbcd0; 65 font-size: 15px; 66 line-height: 20px; 67 margin-top: 10px; 68 } 69 } 70 71 @media (max-width: 650px) { 72 width: 90%; 73 padding: 24px; 74 } 75 76 ${({$wrapperCss:i})=>i} 77`,T=n.div` 78 display: flex; 79 flex-direction: column; 80 align-items: center; 81 justify-content: center; 82 83 h2 { 84 font-weight: 700; 85 font-size: 24px; 86 text-align: center; 87 color: #ecf1f8; 88 } 89 90 @media (max-width: 650px) { 91 h2 { 92 font-size: 20px; 93 } 94 } 95`,_=n.div` 96 margin-top: 24px; 97 width: 100%; 98 display: grid; 99 grid-template-columns: 1fr; 100 gap: 6px; 101 102 button { 103 width: 100%; 104 height: 56px; 105 font-size: 16px; 106 font-weight: 700; 107 letter-spacing: 0.16px; 108 text-align: center; 109 background: transparent; 110 border-radius: 8px; 111 font-family: 'Roboto'; 112 113 &:first-child { 114 background: #6080ff; 115 color: #fff; 116 } 117 118 &:last-child { 119 border: 1px solid #2e364b; 120 color: #a5b2c3; 121 } 122 } 123`,E=n.div` 124 display: flex; 125 justify-content: space-between; 126 align-items: center; 127 border-radius: 8px; 128 border: 1px solid rgba(46, 54, 79, 0.49); 129 background: linear-gradient(180deg, #181e2d 0%, #1b2333 100%); 130 padding: 22px 22px 22px 26px; 131 margin-top: 24px; 132 width: 100%; 133`,Z=n.div` 134 h6 { 135 text-transform: none; 136 margin-bottom: 4px; 137 color: #b6c0d0; 138 font-size: 15px; 139 font-weight: 500; 140 } 141 142 div { 143 display: flex; 144 align-items: center; 145 gap: 6px; 146 color: #ffab3e; 147 font-size: 20px; 148 font-weight: 700; 149 150 img { 151 width: 20px; 152 } 153 } 154`,D=n.div` 155 display: flex; 156 align-items: center; 157 border-radius: 8px; 158 background: #21283b; 159 padding: 6px 2px; 160 161 span { 162 color: #fff; 163 padding: 13px; 164 font-weight: 500; 165 } 166 167 button { 168 width: 36px; 169 height: 100%; 170 display: flex; 171 align-items: center; 172 justify-content: center; 173 background: transparent; 174 color: #7a8697; 175 font-size: 20px; 176 font-weight: 500; 177 letter-spacing: 0.2px; 178 179 &.inactive { 180 opacity: 0.2; 181 } 182 } 183`,V=n.button` 184 border-radius: 6px; 185 background: #6080ff; 186 display: flex; 187 align-items: center; 188 gap: 8px; 189 padding: 19px 30px; 190 color: #fff; 191 font-size: 14px; 192 font-weight: 700; 193 text-transform: uppercase; 194`,q=()=>{const{t:i}=R(),p=S(),e=L(a=>a.modals.data.CONFIRM_MODAL),{action:d,wrapperCss:b}=v(),{buySection:o,inputDefaultValue:j}=e,[x,C]=l.useState(j),[s,g]=l.useState(o?o.defaultAmount:1);l.useEffect(()=>z,[]);const y=a=>!(!a||a.result==="error"||a.error||a.code_text),u=()=>{p(f(null));const a=d?.(x,s);a?.then&&a.then(w=>
194{y(w)&&M(e.successText??i("Successfully"))})};return t.jsxs(H,{$wrapperCss:b,className:c(e.className,e.small&&"sm"),children:[t.jsx(k,{}),t.jsxs(T,{children:[e.img&&t.jsx("img",{loading:"lazy",src:e.img.src,style:e.img.style,alt:""}),t.jsx("h2",{children:e.title??i("AcceptActions")}),t.jsx(h,{dangerouslySetInnerHTML:{__html:e.subtitle}}),e.content.purpose=="exchange-challenge-cups"&&t.jsx($,{data:e.content}),e.warning&&t.jsxs(A,{style:{cursor:"default"},children:[t.jsx("img",{loading:"lazy",src:r("/pages/matches/icons/info.svg"),alt:""}),t.jsx("p",{children:e.warning})]}),e.input&&t.jsx(N,{type:"text",placeholder:e.input,maxLength:e.inputMaxLength??void 0,value:x,onChange:a=>C(a.target.value)}),o?t.jsxs(E,{children:[t.jsxs(Z,{children:[t.jsx("h6",{children:i("Price")}),t.jsxs("div",{children:[o.price*s,t.jsx("img",{loading:"lazy",src:r("/img/general/coin1.png"),alt:""})]})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsxs(D,{children:[t.jsx("button",{onClick:()=>g(s>1?s-1:s),className:c(s<=1&&"inactive"),children:"-"}),t.jsx("span",{children:s}),t.jsx("button",{onClick:()=>g(s<o.maxAmount?s+1:s),className:c(s>=o.maxAmount&&"inactive"),children:"+"})]}),t.jsxs(V,{onClick:u,children:[e.actionText??i("Accept2"),t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:t.jsx("path",{d:"M5.39893 14.4396C6.05184 14.4398 6.58637 14.9864 6.58643 15.6613C6.58643 16.3282 6.05187 16.875 5.39893 16.8752C4.73794 16.8752 4.20264 16.3283 4.20264 15.6613C4.20269 14.9863 4.73797 14.4396 5.39893 14.4396ZM14.2505 14.4396C14.9036 14.4396 15.4389 14.9863 15.439 15.6613C15.439 16.3283 14.9036 16.8752 14.2505 16.8752C13.5896 16.875 13.0552 16.3282 13.0552 15.6613C13.0552 14.9864 13.5897 14.4398 14.2505 14.4396ZM1.81787 1.13202L3.69482 1.4201C3.96237 1.46913 4.1595 1.69374 4.18311 1.96698L4.33252 3.76678C4.35611 4.02462 4.56039 4.21776 4.81201 4.21796H15.439C15.9188 4.21796 16.2337 4.38657 16.5483 4.75604C16.8631 5.12572 16.919 5.65649 16.8481 6.13788L16.1001 11.4094C15.9585 12.4226 15.109 13.1689 14.1099 13.1691H5.5249C4.47847 13.1691 3.61262 12.3508 3.52588 11.2902L2.80225 2.52948L1.61377 2.3205C1.29902 2.26424 1.07823 1.95054 1.1333 1.62909C1.18836 1.30052 1.49538 1.08322 1.81787 1.13202ZM10.6704 7.19061C10.3402 7.19087 10.0806 7.45584 10.0806 7.79315C10.0806 8.12249 10.3401 8.39543 10.6704 8.39569H12.8501C13.1806 8.39569 13.4409 8.12265 13.4409 7.79315C13.4409 7.45568 13.1805 7.19061 12.8501 7.19061H10.6704Z",fill:"white"})})]})]})]}):t.jsxs(_,{children:[d&&t.jsx("button",{onClick:u,children:e.actionText??i("Accept2")}),t.jsx("button",{onClick:()=>p(f(null)),children:i("Back")})]})]})]})},$=({data:i})=>t.jsxs(B,{children:[t.jsxs(m,{children:[t.jsx("img",{loading:"lazy",src:r("/img/icons/challenges/lvl.svg"),alt:""}),t.jsx("span",{children:i.lvl})]}),t.jsx("img",{loading:"lazy",src:r("/img/icons/modals/exchange.svg"),alt:""}),t.jsxs(I,{children:[t.jsx("img",{loading:"lazy",src:r("/img/icons/challenges/modal-cup.svg"),alt:""}),t.jsx("span",{children:i.cups})]})]});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.