ProductSetMissingProductsMessage.react",["fbt","CometPlaceholder.react","CommerceManagerHooks","GeoBaseContextualLayer.react","GeoBaseText.react","GeoFlexbox.react","GeoLink.react","ProductLevelReportingEventsLoggerFalcoEvent","ProductSetMissingProductsMessageQuery.graphql","geoMargin","react","stylex","useGeoTheme"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c,p=m.useEffect,_=m.useRef,f=m.useState,g=e!==void 0?e:e=n("ProductSetMissingProductsMessageQuery.graphql"),h={popoverContainer:{paddingTop:"xyamay9",paddingInlineEnd:"xv54qhq",paddingBottom:"x1l90r2v",paddingInlineStart:"xf7dkkf",width:"x1m258z3",$$css:!0}};function y(e){var t=e.adAccountID,n=e.productSetID,a=e.productSetName,l=e.setHovercardProductSetId,c=e.setShowAddMissingProductsModal,m=o("CommerceManagerHooks").useCommerceManagerLazyQuery(g,{adAccountID:t,productSetID:n}),y=m.xfb_product_level_reporting_top_missing_products,C=y!=null&&y.total_pcv_str!=null&&y.total_pcv_str!==""&&y.total_pcv_out_of_ps_str!=null&&y.total_pcv_out_of_ps_str!=="",b=_(null),v=_(null),S=_(!1),R=_(!1),L=_(null),E=f(!1),k=E[0],I=E[1],T=r("useGeoTheme")(),D=T.selectBorderRadius,x=T.selectElevation,$=T.selectStaticBackgroundColor;return p(function(){if(k){var e=function(){L.current!=null&&(window.clearTimeout(L.current),L.current=null)},t=function(){e(),L.current=window.setTimeout(function(){!S.current&&!R.current&&I(!1),L.current=null},200)},n=function(){S.current=!0,e()},r=function(){S.current=!1,t()},o=function(){R.current=!0,e()},a=function(){R.current=!1,t()},i=b.current,l=v.current;return i!=null&&(i.addEventListener("mouseenter",n),i.addEventListener("mouseleave",r)),l!=null&&(l.addEventListener("mouseenter",o),l.addEventListener("mouseleave",a)),function(){i!=null&&(i.removeEventListener("mouseenter",n),i.removeEventListener("mouseleave",r)),l!=null&&(l.removeEventListener("mouseenter",o),l.removeEventListener("mouseleave",a)),e()}}},[k]),p(function(){C&&r("ProductLevelReportingEventsLoggerFalcoEvent").log(function(){return{action_data:{product_set_id:n},ad_account_id:t!=null?t:"",event:"product_set_insights_am_message_shown",event_severity:"info"}})},[t,C,n]),C?d.jsx(r("CometPlaceholder.react"),{fallback:null,name:i.id,children:d.jsxs(r("GeoFlexbox.react"),{direction:"column",xstyle:r("geoMargin").vert12,children:[d.jsx(r("GeoBaseText.react"),{color:"value",display:"block",size:"header4",weight:"bold",children:s._(/*BTDS*/"Add products with high conversion values")}),d.jsxs(r("GeoBaseText.react"),{color:"value",size:"value",children:[s._(/*BTDS*/"{product set name} is driving a total of {=m2} in {=m4} across ads, including {=m7} from products not promoted in this set.",[s._param("product set name",a),s._implicitParam("=m2",d.jsx("strong",{children:s._(/*BTDS*/"{total product purchases conversion value}",[s._param("total product purchases conversion value",y==null?void 0:y.total_pcv_str)])})),s._implicitParam("=m4",d.jsx("span",{ref:b,className:"xujl8zx xi2nhp4",onMouseEnter:function(){return I(!0)},children:s._(/*BTDS*/"product purchases conversion value")})),s._implicitParam("=m7",d.jsx("strong",{children:s._(/*BTDS*/"{total product purchases conversion value out of product set}",[s._param("total product purchases conversion value out of product set",y==null?void 0:y.total_pcv_out_of_ps_str)])}))])," ",d.jsx(r("GeoLink.react"),{onClick:function(){r("ProductLevelReportingEventsLoggerFalcoEvent").log(function(){return{action_data:{product_set_id:n},ad_account_id:t!=null?t:"",event:"product_set_insights_am_message_cta_click",event_severity:"info"}}),c(!0),l&&l(n)},children:s._(/*BTDS*/"Preview products")})]}),k&&d.jsx(r("GeoBaseContextualLayer.react"),{contextRef:b,position:"above",children:d.jsx("div",babelHelpers.extends({ref:v},(u||(u=r("stylex"))).props($({surface:"content"}),D({context:"container"}),x({level:3}),h.popoverContainer),{children:d.jsxs(r("GeoFlexbox.react"),{direction:"column",children:[d.jsx(r("GeoBaseText.react"),{color:"heading",size:"header3",xstyle:r("geoMargin").bottom8,children:s._(/*BTDS*/"Product purchases conversion value")}),d.jsx(r("GeoBaseText.react"),{color:"value",size:"value",children:s._(/*BTDS*/"The total value of the product items purchased, {attributed ads link}",[s._param("attributed ads link",d.jsx(r("GeoLink.react"),{href:"/help/458681590974355",target:"_blank",children:s._(/*BTDS*/"attributed to your ads")}))])}),d.jsx(r("GeoBaseText.react"),{color:"value",display:"block",size:"value",xstyle:r("geoMargin").top8,children:s._(/*BTDS*/"This metric is {estimatedLink}.",[s._param("estimatedLink",d.jsx(r("GeoLink.react"),{href:"/help/181058782494426?ref=search_new_1",target:"_blank",children:s._(/*BTDS*/"estimated")}))])})]})}))})]})}):null}y.displayName=y.name+" [from "+i.id+"]",l.default=y}),226);
-----
ProductSetMissingProductsMessageQuery.graphql",["ProductSetMissingProductsMessageQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"adAccountID"},{defaultValue:null,kind:"LocalArgument",name:"productSetID"}],t=[{alias:null,args:[{kind:"Variable",name:"ad_account_id",variableName:"adAccountID"},{kind:"Variable",name:"product_set_id",variableName:"productSetID"}],concreteType:"XFBPLRTopMissingProductData",kind:"LinkedField",name:"xfb_product_level_reporting_top_missing_products",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total_pcv_str",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"total_pcv_out_of_ps_str",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"ProductSetMissingProductsMessageQuery",selections:t,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"ProductSetMissingProductsMessageQuery",selections:t},params:{id:n("ProductSetMissingProductsMessageQuery_facebookRelayOperation"),metadata:{},name:"ProductSetMissingProductsMessageQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
ProductSetMissingProductsMessageQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25527907863462291"}),null);
-----
-----
ProductSetMissingProductsMessageQuery.graphql",["ProductSetMissingProductsMessageQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"adAccountID"},{defaultValue:null,kind:"LocalArgument",name:"productSetID"}],t=[{alias:null,args:[{kind:"Variable",name:"ad_account_id",variableName:"adAccountID"},{kind:"Variable",name:"product_set_id",variableName:"productSetID"}],concreteType:"XFBPLRTopMissingProductData",kind:"LinkedField",name:"xfb_product_level_reporting_top_missing_products",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total_pcv_str",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"total_pcv_out_of_ps_str",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"ProductSetMissingProductsMessageQuery",selections:t,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"ProductSetMissingProductsMessageQuery",selections:t},params:{id:n("ProductSetMissingProductsMessageQuery_facebookRelayOperation"),metadata:{},name:"ProductSetMissingProductsMessageQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
ProductSetMissingProductsMessageQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25527907863462291"}),null);
-----