chargeForMessasgesSection-C_HrZ24y.js 1.9 KB

12
  1. import{cb as S,Z as e,U as l,fh as f,ac as C,i as P,a0 as w}from"./index-D_EGaVbS.js";import{T as M}from"./chatBackground-j-mSAtH4.js";import{u as x,S as R}from"./starsRangeInput-DUKz4CVH.js";import{P as h,R as A,S as m}from"./appDialogsManager-B7M3PQZv.js";import{S as T}from"./staticSwitch-C6FESQ3t.js";import"./page-C6VUMrJP.js";import"./avatar-C4f7PAeP.js";import"./putPreloader-NOkcnuw_.js";import"./htmlToSpan-DhAls8qz.js";import"./textToSvgURL-Cnw_Q8Rw.js";import"./fastBlur-Co-79rP4.js";import"./countryInputField-yId9tpyt.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./codeInputField-4XE97kZh.js";const p={duration:200,easing:"ease-out"},k=i=>{const[s,n]=l(!!i.initialStars),[r,a]=l(i.initialStars||0),{commissionPercents:u,willReceiveDollars:d}=x(r);f(()=>{s()?a(t=>t||i.initialStars||1):a(0)});let g=!0;return C(()=>{if(g){g=!1,r();return}i.onStarsChange(r())}),[e(m,{caption:"PaidMessages.ChargeForGroupMessagesDescription",get children(){return e(A,{get rightContent(){return e(T,{get checked(){return s()}})},clickable:()=>{n(t=>!t)},get title(){return P("PaidMessages.ChargeForMessages")}})}}),e(M,{onEnter:async(t,o)=>{const c=t.scrollHeight;await t.animate({height:["0px",c+"px"]},p).finished,o()},onExit:async(t,o)=>{const c=t.clientHeight;await t.animate({height:[c+"px","0px"],opacity:[1,0]},p).finished,o()},get children(){return e(w,{get when(){return s()},get children(){return e(m,{name:"PaidMessages.SetPrice",class:"overflow-hidden",caption:"PaidMessages.SetPriceGroupDescription",get captionArgs(){return[u(),d()]},get children(){return e(R,{get value(){return r()},onChange:a})}})}})}})]},_=(i,s)=>{const n=document.createElement("div"),r=h.createHelper(),a=S(()=>e(s,{get children(){return e(h,{get onCollect(){return r.onCollect},get children(){return e(k,i)}})}}),n);return{element:n,dispose:a,promise:r.await()}};export{_ as default};
  2. //# sourceMappingURL=chargeForMessasgesSection-C_HrZ24y.js.map