;/*FB_PKG_DELIM*/

__d("CometNotificationsListItemFriendRequestAttachment_notifAttachments.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"CometNotificationsListItemFriendRequestAttachment_notifAttachments",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"requester",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"friendship_status",storageKey:null},{alias:null,args:null,concreteType:"TextWithEntities",kind:"LinkedField",name:"social_context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"should_show_osa_explainer",storageKey:null}],type:"FriendRequestNotifAttachment",abstractKey:null};e.exports=a}),null);
__d("CometNotificationsListItemFriendRequestAttachment.react",["fbt","CometFocusTableContext","CometNotificationsListItemFriendRequestAttachment_notifAttachments.graphql","CometRelay","FDSButtonGroup.react","FDSText.react","FriendingCometErrorHandler.react","FriendingCometFriendRequestConfirmMutation","FriendingCometFriendRequestDeleteMutation","FriendingCometFriendRequestStrings","FriendingCometMutualFriendsText.react","FriendingCometTestIDHelper","react","requireDeferred","stylex","useMinifiedProductAttribution","usePartialViewImpression"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react"));e=k;var m=e.useCallback,n=e.useContext,o=c("requireDeferred")("RequestSeenFalcoEvent").__setRef("CometNotificationsListItemFriendRequestAttachment.react"),p={attachment:{marginEnd:"xq8finb",$$css:!0},attachmentClicked:{paddingStart:"x1ye3gou",$$css:!0}};function q(a){a=a.children;return a}function a(a){var e,f,g,k=d("CometRelay").useRelayEnvironment(),r=a.notifAttachments,s=a.onPress;a=d("CometRelay").useFragment(i!==void 0?i:i=b("CometNotificationsListItemFriendRequestAttachment_notifAttachments.graphql"),r);r=a==null?void 0:a.requester;var t=r==null?void 0:r.id;e=(e=r==null?void 0:(e=r.social_context)==null?void 0:e.text)!=null?e:"";var u=(a=a==null?void 0:a.should_show_osa_explainer)!=null?a:!1;a=n(c("CometFocusTableContext"));a=a.FocusCell;a=(a=a)!=null?a:q;var v=d("FriendingCometErrorHandler.react").useFriendingErrorHandler({addFriendId:(f=t)!=null?f:"0",friendingChannel:"GRIFFIN_TAB"}),w=c("useMinifiedProductAttribution")();f=m(function(){s&&s(),t!=null&&d("FriendingCometFriendRequestConfirmMutation").commit({environment:k,friendingChannel:"GRIFFIN_TAB",navigationChain:w,onError:v,senderID:t,shouldDisableOptimisticMutation:u})},[k,v,t,w,s]);var x=m(function(){s&&s(),t!=null&&d("FriendingCometFriendRequestDeleteMutation").commit(k,t,"GRIFFIN_TAB",void 0,v)},[k,v,t,s]),y=m(function(){t!=null&&o.onReady(function(a){a=a.log;return a(function(){var a;return{request_id:(a=t)!=null?a:"",request_surface:"griffin_tab"}})})},[t]);y=c("usePartialViewImpression")({onImpressionStart:y});r=r==null?void 0:r.friendship_status;if(r==null)return null;var z,A=!0;switch(r){case"CAN_REQUEST":z=l.jsx("span",babelHelpers["extends"]({className:"x1y1aw1k xn6708d x18d9i69 x1ye3gou"},{children:l.jsx(c("FDSText.react"),{color:"secondary",type:"body4",children:h._(/*BTDS*/"__JHASH__GsO6_mwl--B__JHASH__")})}));A=!1;break;case"ARE_FRIENDS":z=l.jsx("span",babelHelpers["extends"]({className:"x1y1aw1k xn6708d x18d9i69 x1ye3gou"},{children:l.jsx(c("FDSText.react"),{color:"secondary",type:"body4",children:h._(/*BTDS*/"__JHASH__sLGZl69GoGv__JHASH__")})}));A=!1;break;case"INCOMING_REQUEST":z=l.jsx(c("FDSButtonGroup.react"),{paddingTop:12,primary:{label:h._(/*BTDS*/"__JHASH__6BL0lRNGoBj__JHASH__"),onPress:f,testid:"confirm_button"},secondary:{label:d("FriendingCometFriendRequestStrings").reject(),onPress:x,testid:"ignore_button"},size:"medium"});break;default:z=null}f=A&&t!=null&&e!==""?l.jsx("span",{"data-testid":void 0,children:l.jsx(c("FriendingCometMutualFriendsText.react"),{id:t,socialContextText:e,textType:"body4"})}):null;x=A?l.jsx(a,{children:l.jsx("div",babelHelpers["extends"]({className:"x78zum5 xdt5ytf x1ye3gou xz9dl7a"},{children:f}))}):null;return l.jsxs("div",babelHelpers["extends"]({},(j||(j=c("stylex"))).props(p.attachment,r!=="INCOMING_REQUEST"&&p.attachmentClicked),{"data-testid":void 0,ref:y,children:[x,z]}))}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
__d("CometNotificationsListItemFriendRequestAttachment_notifAttachments$normalization.graphql",[],(function(a,b,c,d,e,f){"use strict";a={kind:"SplitOperation",metadata:{},name:"CometNotificationsListItemFriendRequestAttachment_notifAttachments$normalization",selections:[{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"requester",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"friendship_status",storageKey:null},{alias:null,args:null,concreteType:"TextWithEntities",kind:"LinkedField",name:"social_context",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"text",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"should_show_osa_explainer",storageKey:null}]};e.exports=a}),null);
//# sourceURL=https://static.xx.fbcdn.net/rsrc.php/v4i4bj4/yG/l/rt/V0L0xJhp_M4.js
