-
Notifications
You must be signed in to change notification settings - Fork 882
Expand file tree
/
Copy pathchargeForMessasgesSection-0kEsf6qF.js
More file actions
2 lines (2 loc) · 2.23 KB
/
chargeForMessasgesSection-0kEsf6qF.js
File metadata and controls
2 lines (2 loc) · 2.23 KB
1
2
import{r as f,b as e,c as g,bn as C,ah as w,k as P,a3 as M}from"./index-g7E65A_q.js";import{T as x}from"./transition-D8gKUgt_.js";import{u as R}from"./useStarsCommissionAndWithdrawalPrice-iwWonOsF.js";import{ax as h,ae as m,aa as p}from"./appDialogsManager-D6UEgdgW.js";import{S as k}from"./starsRangeInput-CcAwHSX4.js";import{S as A}from"./staticSwitch-CvsEazYf.js";import"./useAppConfig-2D90JcaZ.js";import"./page-ez4Knvux.js";import"./putPreloader-CRsbRAnP.js";import"./classNames-CN4lTu6a.js";import"./htmlToSpan-DhAls8qz.js";import"./wrapDuration-rbosTUpg.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./toast-DqJWjeCA.js";import"./iconTsx-CGeqk6mb.js";import"./fastBlur-Co-79rP4.js";import"./emailSetup-BL82VHJN.js";import"./countryInputField-DZA1mPJU.js";import"./readBlobAsDataURL-TeCF30mw.js";import"./chatBackground-BIgCea1r.js";import"./scrollable2-BakUsGtK.js";import"./tracking-CLN5mybI.js";const d={duration:200,easing:"ease-out"},T=i=>{const[a,s]=g(!!i.initialStars),[r,n]=g(i.initialStars||0),{commissionPercents:u,willReceiveDollars:S}=R(r);C(()=>{a()?n(t=>t||i.initialStars||1):n(0)});let l=!0;return w(()=>{if(l){l=!1,r();return}i.onStarsChange(r())}),[e(p,{caption:"PaidMessages.ChargeForGroupMessagesDescription",get children(){return e(m,{clickable:()=>{s(t=>!t)},get children(){return[e(m.Title,{get children(){return P("PaidMessages.ChargeForMessages")}}),e(m.RightContent,{get children(){return e(A,{get checked(){return a()}})}})]}})}}),e(x,{onEnter:async(t,o)=>{const c=t.scrollHeight;await t.animate({height:["0px",c+"px"]},d).finished,o()},onExit:async(t,o)=>{const c=t.clientHeight;await t.animate({height:[c+"px","0px"],opacity:[1,0]},d).finished,o()},get children(){return e(M,{get when(){return a()},get children(){return e(p,{name:"PaidMessages.SetPrice",class:"overflow-hidden",caption:"PaidMessages.SetPriceGroupDescription",get captionArgs(){return[u(),S()]},get children(){return e(k,{get value(){return r()},onChange:n})}})}})}})]},V=(i,a)=>{const s=document.createElement("div"),r=h.createHelper(),n=f(()=>e(a,{get children(){return e(h,{get onCollect(){return r.onCollect},get children(){return e(T,i)}})}}),s);return{element:s,dispose:n,promise:r.await()}};export{V as default};
//# sourceMappingURL=chargeForMessasgesSection-0kEsf6qF.js.map