ProdashCometMonetizationFubsPriceSettingsDialog.react",["fbt","BaseDivider.react","CometColumn.react","CometColumnItem.react","CometRelay","FDSDialog.react","FDSDialogFooter.react","FDSDialogHeader.react","FDSRadio.react","FDSTextPairing.react","FanFundingCreatorEventsFalcoEvent","FanFundingLocalizedPrices","FubsImmediatelyChangeSubscriptionPriceMutation","ProdashCometMonetizationFubsPriceSettingsDialogQuery.graphql","cometPushToast","firstKeyWithValue","react","react-compiler-runtime"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u,m=d.useEffect,p=d.useState;function _(t){var a,i,l=o("react-compiler-runtime").c(38),u=t.props,d=t.queries,_=u.onClose,g=u.setListCellBody,h=o("CometRelay").usePreloadedQuery(e!==void 0?e:e=n("ProdashCometMonetizationFubsPriceSettingsDialogQuery.graphql"),d.queryReference),y=h.page,C=y==null||(a=y.fubs_creator)==null||(a=a.subscription_plans[0])==null||(a=a.price)==null?void 0:a.formatted_amount,b=p(C),v=b[0],S=b[1],R=o("CometRelay").useMutation(o("FubsImmediatelyChangeSubscriptionPriceMutation").fubsImmediatelyChangeSubscriptionPriceMutation),L=R[0],E=R[1],k=y==null?void 0:y.id,I,T;if(l[0]!==k?(I=function(){r("FanFundingCreatorEventsFalcoEvent").log(function(){return{event:"creator_price_change_impression",page_id:k}})},T=[k],l[0]=k,l[1]=I,l[2]=T):(I=l[1],T=l[2]),m(I,T),k==null)return null;var D;l[3]!==L||l[4]!==v||l[5]!==C||l[6]!==k||l[7]!==g?(D=function(){var e=r("firstKeyWithValue")(r("FanFundingLocalizedPrices").localized_prices,v),t=r("firstKeyWithValue")(r("FanFundingLocalizedPrices").localized_prices,C),n=s._(/*BTDS*/"You have successfully changed your subscription price."),a=s._(/*BTDS*/"There was an error changing your price. Please try again.");e!=null?(r("FanFundingCreatorEventsFalcoEvent").log(function(){return{event:"creator_price_change_submit",extra_data:{new_price:e,old_price:t!=null?t:"null"},page_id:k}}),L({onCompleted:function(i){var a,l,s=(a=(l=i.fubs_immediately_change_subscription_price)==null||(l=l.fubs_creator)==null||(l=l.subscription_plans[0].price)==null?void 0:l.formatted_amount)!=null?a:v;g(f(s).toString()),o("cometPushToast").cometPushToast({message:n}),r("FanFundingCreatorEventsFalcoEvent").log(function(){return{event:"creator_price_change_success",extra_data:{new_price:e,old_price:t!=null?t:"null"},page_id:k}})},onError:function(){o("cometPushToast").cometPushToast({message:a}),r("FanFundingCreatorEventsFalcoEvent").log(function(){return{event:"creator_price_change_failure",extra_data:{new_price:e,old_price:t!=null?t:"null"},page_id:k}})},variables:{input:{new_pricing_tier:e,page_id:k}}})):(o("cometPushToast").cometPushToast({message:a}),r("FanFundingCreatorEventsFalcoEvent").log(function(){return{event:"creator_price_change_failure",page_id:k}}))},l[3]=L,l[4]=v,l[5]=C,l[6]=k,l[7]=g,l[8]=D):D=l[8];var x=D,$=v==null||v===C||E,P;l[9]!==E?(P=E?s._(/*BTDS*/"Saving..."):s._(/*BTDS*/"Set price"),l[9]=E,l[10]=P):P=l[10];var N;l[11]!==x||l[12]!==$||l[13]!==P?(N={isDisabled:$,label:P,onClick:x},l[11]=x,l[12]=$,l[13]=P,l[14]=N):N=l[14];var M=N,w;if(l[15]!==v||l[16]!==C||l[17]!==(y==null||(i=y.woodhenge_onboarding_info)==null?void 0:i.prices)){var A,F;w=y==null||(A=y.woodhenge_onboarding_info)==null?void 0:A.prices.map(function(e){var t=r("FanFundingLocalizedPrices").localized_prices[e];return c.jsx(r("CometColumnItem.react"),{children:c.jsxs("div",{className:"x6s0dn4 x78zum5 x1qughib",children:[c.jsx("div",{children:c.jsx(r("FDSTextPairing.react"),{headline:t,isPrimaryHeading:!1,level:3,meta:t===C&&s._(/*BTDS*/"Your current subscription price")})}),c.jsx(r("FDSRadio.react"),{checked:v===t,label:"",name:"subscriptionPrice",onChange:function(){return S(t)},value:t})]})},e)}),l[15]=v,l[16]=C,l[17]=y==null||(F=y.woodhenge_onboarding_info)==null?void 0:F.prices,l[18]=w}else w=l[18];var O=w,B;l[19]!==M.isDisabled||l[20]!==M.label||l[21]!==M.onClick?(B=c.jsx(r("FDSDialogFooter.react"),{primary:{disabled:M.isDisabled,label:M.label,onPress:M.onClick}}),l[19]=M.isDisabled,l[20]=M.label,l[21]=M.onClick,l[22]=B):B=l[22];var W;l[23]===Symbol.for("react.memo_cache_sentinel")?(W=s._(/*BTDS*/"Subscription price"),l[23]=W):W=l[23];var q;l[24]!==_?(q=c.jsx(r("FDSDialogHeader.react"),{onClose:_,text:W,withCloseButton:!0}),l[24]=_,l[25]=q):q=l[25];var U;l[26]===Symbol.for("react.memo_cache_sentinel")?(U={className:"x1l90r2v x1g0dm76 xpdmqnj xyamay9"},l[26]=U):U=l[26];var V;l[27]===Symbol.for("react.memo_cache_sentinel")?(V=c.jsx(r("CometColumnItem.react"),{children:c.jsx(r("FDSTextPairing.react"),{body:s._(/*BTDS*/"Set the monthly amount your subscribers will be charged. Previous subscribers will maintain their current monthly price."),isPrimaryHeading:!1,level:3})}),l[27]=V):V=l[27];var H;l[28]!==O?(H=c.jsx("div",babelHelpers.extends({},U,{children:c.jsxs(r("CometColumn.react"),{spacing:16,children:[V,c.jsx(r("CometColumnItem.react"),{children:c.jsx(r("CometColumn.react"),{paddingVertical:8,spacing:12,children:O})})]})})),l[28]=O,l[29]=H):H=l[29];var G;l[30]===Symbol.for("react.memo_cache_sentinel")?(G=c.jsx(r("BaseDivider.react"),{}),l[30]=G):G=l[30];var z;l[31]!==H?(z=c.jsxs(c.Fragment,{children:[H,G]}),l[31]=H,l[32]=z):z=l[32];var j;return l[33]!==_||l[34]!==q||l[35]!==z||l[36]!==B?(j=c.jsx(r("FDSDialog.react"),{footer:B,header:q,onClose:_,children:z}),l[33]=_,l[34]=q,l[35]=z,l[36]=B,l[37]=j):j=l[37],j}function f(e){return s._(/*BTDS*/"Currently {subscription_price}/month",[s._param("subscription_price",e)])}f.displayName=f.name+" [from "+i.id+"]",l.default=_}),226);
-----
ProdashCometMonetizationFubsPriceSettingsDialog.entrypoint",["JSResourceForInteraction","ProdashCometMonetizationFubsPriceSettingsDialogQuery$Parameters"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){var e;return{queries:{queryReference:{parameters:n("ProdashCometMonetizationFubsPriceSettingsDialogQuery$Parameters"),variables:{pageID:(e=t.pageID)!=null?e:""}}}}},root:r("JSResourceForInteraction")("ProdashCometMonetizationFubsPriceSettingsDialog.react").__setRef("ProdashCometMonetizationFubsPriceSettingsDialog.entrypoint")};l.default=e}),98);
-----
ProdashCometMonetizationFubsPriceSettingsDialogQuery$Parameters",["ProdashCometMonetizationFubsPriceSettingsDialogQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("ProdashCometMonetizationFubsPriceSettingsDialogQuery_facebookRelayOperation"),metadata:{},name:"ProdashCometMonetizationFubsPriceSettingsDialogQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
ProdashCometMonetizationFubsPriceSettingsDialogQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24884012757905770"}),null);
-----