LWICometAutoASLSection.react",["fbt","AdsCurrencyFormatter","CometRelay","CometRow.react","CometRowItem.react","FDSSwitch.react","LWICometAutoASLSectionQuery.graphql","LWICometFalcoEvent","LWICometProductUtils","LWIOmniText.react","lwiCometBudgetReducer","qex","react","react-compiler-runtime","useLWILoggerContext","useLWIReducers","withLWICometSpecPart"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k=j||(j=d("react"));e=j;var l=e.useEffect,m=e.useState,n=i!==void 0?i:i=b("LWICometAutoASLSectionQuery.graphql");function a(a){var b=d("react-compiler-runtime").c(44),e=a.adAccountID,f=a.budgetType,g=a.currency,i=a.durationInDays,j=a.isAutoIncreaseAccountSpendingLimitActive,o=a.isExposureLoggingOnly,p=a.runContinuously;a=a.selectedBudget;var q=o===void 0?!1:o;o=d("CometRelay").useLazyLoadQuery(n,{legacyAccountID:e});var r=c("useLWILoggerContext")(),s=r.product;r=m(j!=null?j:!1);var t=r[0],u=r[1];b[0]===Symbol["for"]("react.memo_cache_sentinel")?(j=[c("lwiCometBudgetReducer")],b[0]=j):j=b[0];var v=c("useLWIReducers")(j);r=f==="DAILY_BUDGET"?a*i:a;f=(j=o.ad_account)==null||(j=j.spend_info)==null||(j=j.amount_spent_currency_amount)==null?void 0:j.amount_with_offset;var w=(i=o.ad_account)==null||(i=i.spend_info)==null||(i=i.spend_limit_currency_amount)==null?void 0:i.amount_with_offset,x=Number(f)+r-Number(w),y=p?Math.floor(Number(w)*1.1):Number(w)+Number(x);b[1]!==e||b[2]!==g||b[3]!==v||b[4]!==t||b[5]!==q||b[6]!==y||b[7]!==x||b[8]!==s||b[9]!==w?(a=function(){if(!q){var a=!t;u(a);v({autoIncreaseAccountSpendingLimitValue:x>0&&a?y:null,type:"budget_reducer.set_auto_account_spending_limit"})}d("LWICometFalcoEvent").log({ad_account_id:e,event:"auto_asl_toggle_click",extra_data:{currency:g,exposure_group:q?"control":"test",is_active:String(t),new_asl_value:String(y),old_asl_value:String(w)},product:d("LWICometProductUtils").productFromGraphQLEnumToJSEnumStrict(s)})},b[1]=e,b[2]=g,b[3]=v,b[4]=t,b[5]=q,b[6]=y,b[7]=x,b[8]=s,b[9]=w,b[10]=a):a=b[10];j=a;b[11]!==e||b[12]!==g||b[13]!==v||b[14]!==t||b[15]!==q||b[16]!==y||b[17]!==x||b[18]!==s||b[19]!==w?(i=function(){q||v({autoIncreaseAccountSpendingLimitValue:x>0&&t?y:null,type:"budget_reducer.set_auto_account_spending_limit"}),x>0&&d("LWICometFalcoEvent").log({ad_account_id:e,event:"auto_asl_toggle_impression",extra_data:{currency:g,exposure_group:q?"control":"test",is_active:String(t),new_asl_value:String(y),old_asl_value:String(w)},product:d("LWICometProductUtils").productFromGraphQLEnumToJSEnumStrict(s)})},f=[e,g,v,t,q,y,x,s,w],b[11]=e,b[12]=g,b[13]=v,b[14]=t,b[15]=q,b[16]=y,b[17]=x,b[18]=s,b[19]=w,b[20]=i,b[21]=f):(i=b[20],f=b[21]);l(i,f);if(((r=o.ad_account)==null||(r=r.viewer_permissions)==null?void 0:r.billing_write)!==!0)return null;b[22]!==g||b[23]!==w?(a=c("AdsCurrencyFormatter").formatCurrencyWithNumberDelimiters(g,Number(w)),b[22]=g,b[23]=w,b[24]=a):a=b[24];i=a;b[25]!==g||b[26]!==y?(f=c("AdsCurrencyFormatter").formatCurrencyWithNumberDelimiters(g,y),b[25]=g,b[26]=y,b[27]=f):f=b[27];o=f;b[28]===Symbol["for"]("react.memo_cache_sentinel")?(r=h._(/*BTDS*/"Automatically increase your account spending limit to deliver this ad"),b[28]=r):r=b[28];a=r;b[29]!==o||b[30]!==i||b[31]!==t||b[32]!==p?(f=t?p?h._(/*BTDS*/"To fully deliver this ad, weu2019ll increase your account spending limit by 10u0025. It will reset to your original limit at your next billing cycle."):h._(/*BTDS*/"To fully deliver this ad, weu2019ll increase your {Formatted Spend Limit} account spending limit to {Formatted IncreasedSpend Limit}. It will reset to your original limit at your next billing cycle.",[h._param("Formatted Spend Limit",i),h._param("Formatted IncreasedSpend Limit",o)]):p?h._(/*BTDS*/"To fully deliver this ad, you need to increase your account spending limit by 10u0025. Once increased, it will reset to your original limit at your next billing cycle."):h._(/*BTDS*/"This ad may not fully deliver. Once your account spending limit reaches {Formatted Spend Limit}, your ad will stop delivering unless you update your limit to {Formatted IncreasedSpend Limit}. It will reset to your original limit at your next billing cycle.",[h._param("Formatted Spend Limit",i),h._param("Formatted IncreasedSpend Limit",o)]),b[29]=o,b[30]=i,b[31]=t,b[32]=p,b[33]=f):f=b[33];r=f;if(x<=0||w==null)return null;c("qex")._("663");if(q)return null;b[34]===Symbol["for"]("react.memo_cache_sentinel")?(o={className:"xyqm7xq x1ys307a xedcshv x1k90msu xpsqcfj x1qfuztq xjwep3j x1t39747 x1wcsgtt x1pczhz8 x78zum5 xdt5ytf x1a02dak x1l90r2v xlhe6ec"},b[34]=o):o=b[34];b[35]===Symbol["for"]("react.memo_cache_sentinel")?(i=k.jsx(c("CometRowItem.react"),{children:k.jsx(c("LWIOmniText.react"),{numberOfLines:3,type:"bodyLink3",children:a})}),b[35]=i):i=b[35];b[36]!==t||b[37]!==j?(p=k.jsxs(c("CometRow.react"),{align:"justify",verticalAlign:"center",children:[i,k.jsx(c("CometRowItem.react"),{children:k.jsx(c("FDSSwitch.react"),{"aria-label":a,onValueChange:j,value:t})})]}),b[36]=t,b[37]=j,b[38]=p):p=b[38];b[39]!==r?(f=k.jsx(c("CometRow.react"),{children:k.jsx(c("CometRowItem.react"),{children:k.jsx(c("LWIOmniText.react"),{numberOfLines:3,type:"body3",children:r})})}),b[39]=r,b[40]=f):f=b[40];b[41]!==p||b[42]!==f?(i=k.jsxs("div",babelHelpers["extends"]({},o,{children:[p,f]})),b[41]=p,b[42]=f,b[43]=i):i=b[43];return i}f=c("withLWICometSpecPart")(a,function(a){return{_autoIncreaseAccountSpendingLimitValue:a.autoIncreaseAccountSpendingLimitValue,adAccountID:a.adAccountData.legacyAccountID,budgetType:a.budgetData.budgetType,currency:a.adAccountData.currency,durationInDays:a.durationInDays,isAutoIncreaseAccountSpendingLimitActive:a.isAutoIncreaseAccountSpendingLimitActive,runContinuously:a.runContinuously,selectedBudget:a.budgetData.budget}});g["default"]=f}),226);
-----
LWICometAutoASLSectionQuery.graphql",["LWICometAutoASLSectionQuery_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"legacyAccountID"}],c=[{kind:"Variable",name:"legacy_account_id",variableName:"legacyAccountID"}],d=[{alias:null,args:null,kind:"ScalarField",name:"amount_with_offset",storageKey:null}];d={alias:null,args:null,concreteType:"AdAccountSpendInfo",kind:"LinkedField",name:"spend_info",plural:!1,selections:[{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"amount_spent_currency_amount",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"spend_limit_currency_amount",plural:!1,selections:d,storageKey:null}],storageKey:null};var e={alias:null,args:null,concreteType:"AdAccountPermissions",kind:"LinkedField",name:"viewer_permissions",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"billing_write",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LWICometAutoASLSectionQuery",selections:[{alias:null,args:c,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[d,e],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LWICometAutoASLSectionQuery",selections:[{alias:null,args:c,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[d,e,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:b("LWICometAutoASLSectionQuery_facebookRelayOperation"),metadata:{},name:"LWICometAutoASLSectionQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
LWICometAutoASLSectionQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="30291463390498726"}),null);
-----
-----
LWICometAutoASLSectionQuery.graphql",["LWICometAutoASLSectionQuery_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"legacyAccountID"}],c=[{kind:"Variable",name:"legacy_account_id",variableName:"legacyAccountID"}],d=[{alias:null,args:null,kind:"ScalarField",name:"amount_with_offset",storageKey:null}];d={alias:null,args:null,concreteType:"AdAccountSpendInfo",kind:"LinkedField",name:"spend_info",plural:!1,selections:[{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"amount_spent_currency_amount",plural:!1,selections:d,storageKey:null},{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"spend_limit_currency_amount",plural:!1,selections:d,storageKey:null}],storageKey:null};var e={alias:null,args:null,concreteType:"AdAccountPermissions",kind:"LinkedField",name:"viewer_permissions",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"billing_write",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"LWICometAutoASLSectionQuery",selections:[{alias:null,args:c,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[d,e],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"LWICometAutoASLSectionQuery",selections:[{alias:null,args:c,concreteType:"AdAccount",kind:"LinkedField",name:"ad_account",plural:!1,selections:[d,e,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:b("LWICometAutoASLSectionQuery_facebookRelayOperation"),metadata:{},name:"LWICometAutoASLSectionQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
LWICometAutoASLSectionQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="30291463390498726"}),null);
-----