1"use strict";(self.webpackChunkmy_app=self.webpackChunkmy_app||[]).push([[366],{2366:(s,e,o)=>{o.r(e),o.d(e,{default:()=>d});var n=o(5043),a=o(4117),t=o(1591),p=o(7126);const i="Donate_donate__uEXl2",r="Donate_donate__form__08xMt",_="Donate_donate__input__SJH-6",l="Donate_donate__button__FP3hi";var h=o(6213),c=o(579);const m=s=>{let{sum:e,phoneNumber:o,handlePhoneNumberChange:t,payload:p,paymentMethod:m}=s;const[u,d]=(0,n.useState)(e.toString()),[g,y]=(0,n.useState)(o||"+998"),{t:x,i18n:S}=(0,a.Bd)();(0,n.useEffect)((()=>{d(e.toString())}),[e]),(0,n.useEffect)((()=>{y(o||"+998")}),[o]);return(0,c.jsx)("div",{className:i,children:(0,c.jsxs)("form",{className:r,onSubmit:async s=>{if(s.preventDefault(),"0"!==u)if(m)try{const s={...p,phoneNumber:g},e=await h.A.post("https://api.adolat.uz/payment/".concat(m,"/"),s),{payment_url:o}=e.data;window.open(o)}catch(e){console.error("Donate error:",e)}else alert("ru"===S.language?"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b":"Tulov turini tanlang.");else alert("Please enter an amount greater than zero.")},children:[(0,c.jsx)("input",{type:"number",value:u,onChange:s=>d(s.target.value),className:_,placeholder:"Other amount",required:!0}),(0,c.jsx)("input",{type:"text",value:g,onChange:s=>{let e=s.target.value.replace(/[^\d]/g,"");e.length>12&&(e=e.slice(0,12)),e.startsWith("998")||(e="998".concat(e.slice(3))),y("+".concat(e));const o="+".concat(e);"function"===typeof t&&t({target:{value:o}})},className:_,placeholder:"+998",required:!0}),(0,c.jsx)("button",{type:"submit",className:l,children:x("Payment")})]})})},u={sponsorship:"Sponsorship_sponsorship__JLXeg",sponsorship__position:"Sponsorship_sponsorship__position__bhX8A",sponsorship__title:"Sponsorship_sponsorship__title__aRDxW",sponsorship__info:"Sponsorship_sponsorship__info__0lt6a",sponsorship__payme:"Sponsorship_sponsorship__payme__nnZpq","sponsorship__payme-logo":"Sponsorship_sponsorship__payme-logo__bEBMa",sponsorship__form:"Sponsorship_sponsorship__form__7iWy0",position:"Sponsorship_position__vUptq",sponsorship__btn:"Sponsorship_sponsorship__btn__Qu89W",sponsorship__payment:"Sponsorship_sponsorship__payment__6UMOa",sponsorship__payment_price:"Sponsorship_sponsorship__payment_price__mx76W",sponsorship__payment_price_active:"Sponsorship_sponsorship__payment_price_active__hQAg-","image-radio":"Sponsorship_image-radio__ZVsQn"},d=()=>{const{t:s}=(0,a.Bd)(),[e,o]=(0,n.useState)(0),[i,r]=(0,n.useState)(""),[_,l]=(0,n.useState)(""),h=s=>l(s),d={amount:e,phone_number:i,donation_type:"donat"};return(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(p.A,{className:u.sponsorship,children:[(0,c.jsxs)(t.m,{children:[(0,c.jsx)("meta",{charSet:"utf-8"}),(0,c.jsx)("title",{children:s("Donate")}),(0,c.jsx)("link",{rel:"canonical",href:"http://mysite.com/example"})]}),(0,c.jsx)("h1",{className:u.sponsorship__title,children:s("SocialDemocraticPartyofUzbekistanAdolat")}),(0,c.jsxs)("div",{className:u.sponsorship__block,children:[(0,c.jsx)(m,{paymentMethod:_,payload:d,sum:e,setSelectedAmount:o,handleCustomAmount:s=>o(s),phoneNumber:i,handlePhoneNumberChange:s=>r(s.target.value),onSubmit:()=>
1{(_||(alert("Tulov turini tanlang."),0))&&console.log("Submitting form with payload:",{amount:e,phone_number:i,paymentMethod:_})}}),(0,c.jsx)("div",{className:u.sponsorship__payment,children:[5e3,1e4,15e3,25e3,0].map((n=>(0,c.jsx)("p",{className:u.sponsorship__payment_price+(e===n?" ".concat(u.sponsorship__payment_price_active):""),onClick:()=>(s=>o(s))(n),children:0===n?"".concat(s("Other")):"".concat(n," ").concat(s("Sum"))},n)))}),(0,c.jsx)("div",{className:u.sponsorship__info,children:(0,c.jsxs)("div",{className:u.sponsorship__payme,children:[(0,c.jsxs)("label",{className:u["image-radio"],children:[(0,c.jsx)("input",{type:"radio",name:"paymentMethod",value:"donations",checked:"donations"===_,onChange:s=>h(s.target.value),className:u["image-radio-input"],required:!0}),(0,c.jsx)("img",{width:200,className:u.sponsorship__payme_logo,src:"https://turonbank.uz/bitrix/templates/main/images/cards/payments/payme.png",alt:"donations"})]}),(0,c.jsxs)("label",{className:u["image-radio"],children:[(0,c.jsx)("input",{type:"radio",name:"paymentMethod",value:"click-donation",checked:"click-donation"===_,onChange:s=>h(s.target.value),className:u["image-radio-input"],required:!0}),(0,c.jsx)("img",{width:200,className:u.sponsorship__payme_logo,src:"https://api.logobank.uz/media/logos_png/Click-01.png",alt:"click-donation"})]})]})})]})]})})}}}]); 2//# sourceMappingURL=366.9040c238.chunk.js.map
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.