DeveloperPlatformSearchResultsView.react",["fbt","DeveloperPlatformSearchResultItem.react","DeveloperPlatformSearchResultsGlimmer.react","DeveloperPlatformSearchResultsViewQuery.graphql","DeveloperSearchFilterOption","MCDSButton.react","MCDSText.react","MCDSVerticalStack.react","RelayHooks","XFBDeveloperSearchFilterOptionUtils.facebook","mcdsPadding","react"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u,m=d.useCallback,p=d.useEffect,_=d.useMemo,f=d.useState,g={loadMoreButton:{marginTop:"xdj266r",marginInlineEnd:"x11t971q",marginBottom:"xat24cr",marginInlineStart:"xvc5jky",maxWidth:"x1hzehfu",$$css:!0}},h=15,y=e!==void 0?e:e=n("DeveloperPlatformSearchResultsViewQuery.graphql");function C(e){var t=e.queryString,n=e.selectedFilter,a=o("RelayHooks").useRelayEnvironment(),i=f([]),l=i[0],u=i[1],d=f(0),C=d[0],b=d[1],v=f(!1),S=v[0],R=v[1],L=f(!0),E=L[0],k=L[1],I=_(function(){return n==null?null:o("XFBDeveloperSearchFilterOptionUtils.facebook").fromJSEnum(r("DeveloperSearchFilterOption").cast(n))},[n]);p(function(){u([]),R(!1),k(!0),b(0)},[t,I]);var T=o("RelayHooks").useLazyLoadQuery(y,{query:t,offset:0,pageSize:h,searchFilterOption:I},{fetchPolicy:"store-or-network"});p(function(){if(T!=null&&T.xfb_dev_docs_search&&E){var e=T.xfb_dev_docs_search;u(e),k(!1),b(C+h)}},[T,E,C]);var D=m(function(){S||(R(!0),o("RelayHooks").fetchQuery(a,y,{query:t,offset:C,pageSize:h,searchFilterOption:I}).toPromise().then(function(e){if(e!=null&&e.xfb_dev_docs_search){var t=e.xfb_dev_docs_search;u(function(e){return[].concat(e,t)})}R(!1),b(C+h)}).catch(function(e){R(!1)}))},[S,a,t,C,I]);return E?c.jsx(r("DeveloperPlatformSearchResultsGlimmer.react"),{}):l.length===0?c.jsx(r("MCDSText.react"),{color:"secondary",display:"block",type:"mcds-large-body",xstyle:r("mcdsPadding").top16,children:s._(/*BTDS*/"No results found, try different keywords.")}):c.jsxs(r("MCDSVerticalStack.react"),{gap:48,children:[c.jsx(r("MCDSVerticalStack.react"),{gap:24,children:l.map(function(e,n){var o,a,i;return c.jsx(r("DeveloperPlatformSearchResultItem.react"),{searchQuery:t,snippet:(o=e.snippet)!=null?o:"",testId:"result-"+n,title:(a=e.title)!=null?a:"",url:(i=e.href)!=null?i:""},"result-"+n)})}),c.jsx(r("MCDSButton.react"),{isLoading:S,label:c.jsx(r("MCDSText.react"),{children:s._(/*BTDS*/"Load more")}),onClick:D,type:"secondary",xstyle:g.loadMoreButton})]})}C.displayName=C.name+" [from "+i.id+"]",l.default=C}),226);
-----
DeveloperPlatformSearchResultsViewQuery.graphql",["DeveloperPlatformSearchResultsViewQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"offset"},t={defaultValue:null,kind:"LocalArgument",name:"pageSize"},r={defaultValue:null,kind:"LocalArgument",name:"query"},o={defaultValue:null,kind:"LocalArgument",name:"searchFilterOption"},a=[{alias:null,args:[{kind:"Variable",name:"offset",variableName:"offset"},{kind:"Variable",name:"page_size",variableName:"pageSize"},{kind:"Variable",name:"query",variableName:"query"},{kind:"Variable",name:"search_filter_option",variableName:"searchFilterOption"}],concreteType:"XFBDeveloperDocumentationSearchResult",kind:"LinkedField",name:"xfb_dev_docs_search",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"snippet",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"href",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:[e,t,r,o],kind:"Fragment",metadata:null,name:"DeveloperPlatformSearchResultsViewQuery",selections:a,type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[r,e,t,o],kind:"Operation",name:"DeveloperPlatformSearchResultsViewQuery",selections:a},params:{id:n("DeveloperPlatformSearchResultsViewQuery_facebookRelayOperation"),metadata:{},name:"DeveloperPlatformSearchResultsViewQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperPlatformSearchResultsViewQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25422647920675267"}),null);
-----