CometComposerLinksInPostQuotaPopover.react",["ix","CometComposerLinksInPostQuotaPopoverQuery.graphql","CometLink.react","CometRelay","CometRow.react","CometRowItem.react","FDSIcon.react","FDSPopover.react","FDSTextPairing.react","LinksInPostFbtUtils","LinksInPostUtils","fbicon","gkx","react","react-compiler-runtime","useCometComposerLoggerDispatcher","useFullViewImpression"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u.useCallback,m=e!==void 0?e:e=n("CometComposerLinksInPostQuotaPopoverQuery.graphql");function p(e){var t,n,a,i,l,u,d,p,_,f,g,h,y,C,b,v,S=o("react-compiler-runtime").c(41),R=e.props,L=e.queries,E=R.isEditingPreExistingStory,k=o("CometRelay").usePreloadedQuery(m,L.root),I=r("useCometComposerLoggerDispatcher")(),T=r("gkx")("20568"),D=(t=(n=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:n.quota)!=null?t:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.quota,x=(a=(i=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:i.usage)!=null?a:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.usage,$=(l=(u=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:u.onboarding_uri)!=null?l:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.onboarding_uri,P=(d=(p=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:p.has_mv4b_application_in_review)!=null?d:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.has_mv4b_application_in_review,N=(_=(f=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:f.has_mv4c_application_in_review)!=null?_:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.has_mv4c_application_in_review,M=(g=(h=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:h.has_active_benefit)!=null?g:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.has_active_benefit,w=(y=(C=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:C.is_mv4b_eligible)!=null?y:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.is_mv4b_eligible,A=(b=(v=k.xfb_nme_unified_benefit_fb_links_in_posts_usage)==null?void 0:v.is_mv4c_eligible)!=null?b:o("LinksInPostUtils").LIP_USAGE_DEFAULTS.is_mv4c_eligible,F=T?A:w,O=T?N:P,B=Math.max(D-x,0),W;S[0]!==M||S[1]!==O||S[2]!==F||S[3]!==B?(W=o("LinksInPostFbtUtils").getPopoverHeadlineText({hasActiveBenefit:M,hasApplicationInReview:O,isMVEligible:F,linksRemaining:B}),S[0]=M,S[1]=O,S[2]=F,S[3]=B,S[4]=W):W=S[4];var q=W,U;S[5]!==M||S[6]!==F||S[7]!==B||S[8]!==D?(U=o("LinksInPostFbtUtils").getPopoverBodyText({hasActiveBenefit:M,isMVEligible:F,linksRemaining:B,quota:D}),S[5]=M,S[6]=F,S[7]=B,S[8]=D,S[9]=U):U=S[9];var V=U,H=r("gkx")("20522")&&M&&D>0&&B===0,G=!O&&(!M&&F||H),z;S[10]!==G||S[11]!==E||S[12]!==I||S[13]!==$||S[14]!==D||S[15]!==x?(z=function(){I({fields:{is_edit_session:E,link_quota:D,link_usage:x,onboarding_uri:G?$:null},type:"LINKS_IN_POST_POPOVER_IMPRESSION"})},S[10]=G,S[11]=E,S[12]=I,S[13]=$,S[14]=D,S[15]=x,S[16]=z):z=S[16];var j=z,K;S[17]!==j?(K={onFullViewStart:j},S[17]=j,S[18]=K):K=S[18];var Q=r("useFullViewImpression")(K),X;S[19]===Symbol.for("react.memo_cache_sentinel")?(X=o("LinksInPostFbtUtils").getPopoverLabel(),S[19]=X):X=S[19];var Y;S[20]!==G?(Y={0:{className:"x1vktgvc x1l90r2v"},1:{className:"x1vktgvc x1l90r2v x1o2pa38 x2b8uid"}}[!G<<0],S[20]=G,S[21]=Y):Y=S[21];var J=G?V:null,Z;S[22]!==q||S[23]!==J?(Z=c.jsx(r("CometRowItem.react"),{children:c.jsx(r("FDSTextPairing.react"),{body:J,bodyColor:"secondary",headline:q,isSemanticHeading:!0,level:4})}),S[22]=q,S[23]=J,S[24]=Z):Z=S[24];var ee;S[25]!==G||S[26]!==E||S[27]!==I||S[28]!==$||S[29]!==D||S[30]!==x?(ee=G&&c.jsx(r("CometRowItem.react"),{verticalAlign:"center",children:c.jsx(r("CometLink.react"),{"aria-label":o("LinksInPostFbtUtils").getPopoverLinkLabel(),href:$,onClick:function(){I({fields:{is_edit_session:E,link_quota:D,link_usage:x,onboarding_uri:$},type:"LINKS_IN_POST_POPOVER_CLICK"})},target:"_blank",children:c.jsx(r("FDSIcon.react"),{icon:o("fbicon")._(s("492533"),16)})})}),S[25]=G,S[26]=E,S[27]=I,S[28]=$,S[29]=D,S[30]=x,S[31]=ee):ee=S[31];var te;S[32]!==ee||S[33]!==Z?(te=c.jsxs(r("CometRow.react"),{children:[Z,ee]}),S[32]=ee,S[33]=Z,S[34]=te):te=S[34];var ne;S[35]!==te||S[36]!==Y?(ne=c.jsx("div",babelHelpers.extends({},Y,{children:te})),S[35]=te,S[36]=Y,S[37]=ne):ne=S[37];var re;return S[38]!==Q||S[39]!==ne?(re=c.jsx(r("FDSPopover.react"),{"aria-label":X,ref:Q,withArrow:!0,children:ne}),S[38]=Q,S[39]=ne,S[40]=re):re=S[40],re}l.default=p}),98);
-----
CometComposerLinksInPostQuotaPopoverQuery.graphql",["CometComposerLinksInPostQuotaPopoverQuery_facebookRelayOperation","relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"entrypoint"},{defaultValue:null,kind:"LocalArgument",name:"waterfall_event"}],t=[{alias:null,args:[{kind:"Variable",name:"entrypoint",variableName:"entrypoint"},{kind:"Variable",name:"waterfall_event",variableName:"waterfall_event"}],concreteType:"XFBNMEUnifiedBenefitFBLinksInPostsUsageData",kind:"LinkedField",name:"xfb_nme_unified_benefit_fb_links_in_posts_usage",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"has_active_benefit",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"has_mv4b_application_in_review",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"has_mv4c_application_in_review",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_mv4b_eligible",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_mv4c_eligible",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"onboarding_uri",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"quota",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"usage",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"CometComposerLinksInPostQuotaPopoverQuery",selections:t,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"CometComposerLinksInPostQuotaPopoverQuery",selections:t},params:{id:n("CometComposerLinksInPostQuotaPopoverQuery_facebookRelayOperation"),metadata:{},name:"CometComposerLinksInPostQuotaPopoverQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----
CometComposerLinksInPostQuotaPopover.entrypoint",["CometComposerLinksInPostQuotaPopoverQuery$Parameters","JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){var e=t.entrypoint,n=t.waterfall_event;return{queries:{root:{options:{fetchPolicy:"network-only"},parameters:r("CometComposerLinksInPostQuotaPopoverQuery$Parameters"),variables:{entrypoint:e,waterfall_event:n}}}}},root:r("JSResourceForInteraction")("CometComposerLinksInPostQuotaPopover.react").__setRef("CometComposerLinksInPostQuotaPopover.entrypoint")};l.default=e}),98);
-----
CometComposerLinksInPostQuotaPopoverQuery$Parameters",["CometComposerLinksInPostQuotaPopoverQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("CometComposerLinksInPostQuotaPopoverQuery_facebookRelayOperation"),metadata:{},name:"CometComposerLinksInPostQuotaPopoverQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
CometComposerLinksInPostQuotaPopoverQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25486559194365098"}),null);
-----