1import{e as r,a as x,s as g,f as w,g as _,j as t}from"./index-ePwWFRi3.js";import{w as j,r as B,R as N,S as V}from"./UserRouter-CzzbX84q.js";import{S as L}from"./Spinner-BwmgTLx7.js";import"./___vite-browser-external_commonjs-proxy-DwoBiO5t.js";import"./Button-DVnPiWzl.js";import"./DialogActions-1l5OBIzS.js";import"./CustomButton-BtaGzRdp.js";import"./trackApkDownload-PL4YyPKe.js";const M=({title:i,titleId:n,...d},c)=>r.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:c,"aria-labelledby":n,...d},i?r.createElement("title",{id:n},i):null,r.createElement("g",{clipPath:"url(#clip0_900_5518)"},r.createElement("path",{d:"M6 7.5C6.82845 7.5 7.5 6.82845 7.5 6C7.5 5.17155 6.82845 4.5 6 4.5C5.17155 4.5 4.5 5.17155 4.5 6C4.5 6.82845 5.17155 7.5 6 7.5Z",stroke:"currentColor",strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M1 6.44068V5.56068C1 5.04068 1.425 4.6107 1.95 4.6107C2.855 4.6107 3.225 3.9707 2.77 3.1857C2.51 2.7357 2.665 2.1507 3.12 1.8907L3.985 1.3957C4.38 1.1607 4.89 1.3007 5.125 1.6957L5.18 1.7907C5.63 2.5757 6.37 2.5757 6.825 1.7907L6.88 1.6957C7.115 1.3007 7.625 1.1607 8.02 1.3957L8.885 1.8907C9.34 2.1507 9.495 2.7357 9.235 3.1857C8.78 3.9707 9.15 4.6107 10.055 4.6107C10.575 4.6107 11.005 5.03568 11.005 5.56068V6.44068C11.005 6.96068 10.58 7.39068 10.055 7.39068C9.15 7.39068 8.78 8.03068 9.235 8.81568C9.495 9.27068 9.34 9.85068 8.885 10.1107L8.02 10.6057C7.625 10.8407 7.115 10.7007 6.88 10.3057L6.825 10.2107C6.375 9.42568 5.635 9.42568 5.18 10.2107L5.125 10.3057C4.89 10.7007 4.38 10.8407 3.985 10.6057L3.12 10.1107C2.665 9.85068 2.51 9.26568 2.77 8.81568C3.225 8.03068 2.855 7.39068 1.95 7.39068C1.425 7.39068 1 6.96068 1 6.44068Z",stroke:"currentColor",strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"})),r.createElement("defs",null,r.createElement("clipPath",{id:"clip0_900_5518"},r.createElement("rect",{width:12,height:12,fill:"white"})))),S=r.forwardRef(M),E="data:image/svg+xml,%3csvg%20width='15'%20height='2'%20viewBox='0%200%2015%202'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%201C15%201.55228%2014.6269%202%2014.1667%202L0.833333%202C0.373095%202%20-1.00588e-08%201.55228%200%201C1.00588e-08%200.447715%200.373095%20-1.20706e-08%200.833333%200L14.1667%203.49691e-07C14.6269%203.61762e-07%2015%200.447716%2015%201Z'%20fill='black'/%3e%3c/svg%3e",y="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.88889%200.888889C8.88889%200.397969%208.49092%200%208%200C7.50908%200%207.11111%200.397969%207.11111%200.888889V7.11111H0.888889C0.397968%207.11111%200%207.50908%200%208C0%208.49092%200.397968%208.88889%200.888889%208.88889H7.11111V15.1111C7.11111%2015.602%207.50908%2016%208%2016C8.49092%2016%208.88889%2015.602%208.88889%2015.1111V8.88889H15.1111C15.602%208.88889%2016%208.49092%2016%208C16%207.50908%2015.602%207.11111%2015.1111%207.11111H8.88889V0.888889Z'%20fill='black'/%3e%3c/svg%3e",A=i=>{const{buttonVariables:n,fetchButtonVariables:d,setAlertMsg:c,langData:e}=i,p=w(),[b,h]=r.useState(!1),[u,m]=r.useState(),C=async()=>{h(!0);for(let a of u)if(!a.label||!a.stake)return p(c({type:"error",message:e==null?void 0:e.invalid_label_or_amount_txt})),0;const s=await V.put("/catalog/v2/settings/favourite-stakes/users",u,{headers:{Authorization:sessionStorage.getItem("jwt_token")}});(s.status=200)?c({type:"success",message:e==null?void 0:e.button_variables_save_success_txt}):c({type:"error",message:e==null?void 0:e.general_err_txt}),d(),h(!1)};r.useEffect(()=>{d()},[]),r.useEffect(()=>{m(n)},[n]);const f=(s,a)=>{const l=[...u];l[s].label=a,m(l)},k=(s,a)=>{const l=[...u];l[s].stake=a,m(l)},v=(s,a,l)=>{a==null&&p(c({type:"error",message:e==null?void 0:e.enter_min_value_txt}));const o=[...u];l==="+"?o[s].stake+=o[s].stake:(o[s].stake-=Math.floor(o[s].stake/2),o[s].stake<=0&&(o[s].stake=0)),m(o)};return _(),t.jsx("div",{className:"button-variables-ctn",children:t.jsxs("div",{className:"stake-settings",children:[t.jsx(B,{back:e==null?void 0:e.back}),b?t.jsx(L,{}):null,t.jsx(N,{titleIcon:S,reportName:e==null?void 0:e.stake_settings,reportFilters:[{element:t.jsxs("div",{className:"text",children:[e==null?void 0:e.change_input_label_settings_txt,":"]}
1)}],tabsOrBtns:[{label:e==null?void 0:e.save,onSelect:()=>C(),className:"black-font"}]}),t.jsx("div",{className:"stake-settings-ctn",children:n.map((s,a)=>t.jsxs("div",{className:"indv-stake-btn",children:[t.jsxs("div",{className:"label-text",children:[t.jsx("div",{className:"label-text-sub",children:e==null?void 0:e.button_label}),t.jsx("input",{type:"text",className:"bt-input",value:s.label,onChange:l=>f(a,l.target.value)})]}),t.jsxs("div",{className:"label-number",children:[t.jsx("div",{className:"label-text-sub",children:e==null?void 0:e.input_value}),t.jsx("div",{className:"support-add-stake-input",children:t.jsxs("div",{className:"add-stake-input",children:[t.jsx("div",{className:"plus-div",onClick:()=>v(a,s.stake,"+"),children:t.jsx("img",{className:"plus-btn",src:y,alt:""})}),t.jsx("input",{type:"number",className:"bt-input width",value:s.stake,onChange:l=>k(a,parseFloat(l.target.value))}),t.jsx("div",{className:"minus-div",onClick:()=>v(a,s.stake,"-"),children:t.jsx("img",{className:"minus-btn",src:E,alt:""})})]})})]})]}))})]})})},R=i=>({buttonVariables:i.exchBetslip.buttonVariables,langData:i.common.langData}),H=i=>({fetchButtonVariables:()=>i(j()),setAlertMsg:n=>i(g(n))}),q=x(R,H)(A);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.