DeveloperTestAppCreateLazyModal.react",["fbt","AsyncRequest","AsyncResponse","DeveloperApplicationQPLUtils.react","DeveloperTestAppCreateLazyModalQuery.graphql","GeoButton.react","GeoCancelButton.react","GeoModalFooter.react","GeoModalHeader.react","GeoModal_DEPRECATED.react","GeoSection.react","GeoText.react","GeoTextInput.react","HelpLink.react","RelayHooks","XDeveloperAppCreateAsyncControllerRouteBuilder","XDeveloperDocumentationControllerRouteBuilder","react"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=u,m=d.useEffect,p=d.useState,_=e!==void 0?e:e=n("DeveloperTestAppCreateLazyModalQuery.graphql"),f=32,g=r("XDeveloperDocumentationControllerRouteBuilder").buildUri({path1:"apps",path2:"test-apps"});function h(e,t){var n,r=t.length+1;do{var o=" - Test"+r,a=e.slice(0,f-o.length);n=a+o,r+=1}while(t.includes(n));return n}function y(e){var t,n,a,i=e.appID,l=e.isShown,u=e.onHide,d=o("RelayHooks").useLazyLoadQuery(_,{appId:i,skip:!1}),f=d.node,y=(t=f==null||(n=f.child_apps)==null?void 0:n.map(function(e){return e.name}))!=null?t:[];m(function(){l&&o("DeveloperApplicationQPLUtils.react").markAllAppsPagePoint(o("DeveloperApplicationQPLUtils.react").AllAppsPagePoint.ALL_APPS_PAGE_CREATE_TEST_APP_DIALOG_RENDERED)},[l]);var C=p(h((a=f==null?void 0:f.name)!=null?a:"",y)),b=C[0],v=C[1],S=p(!1),R=S[0],L=S[1],E=function(){var e;L(!0),o("DeveloperApplicationQPLUtils.react").markAllAppsPagePoint(o("DeveloperApplicationQPLUtils.react").AllAppsPagePoint.ALL_APPS_PAGE_CREATE_TEST_APP_DIALOG_CONFIRM_CLICKED),new(r("AsyncRequest"))(r("XDeveloperAppCreateAsyncControllerRouteBuilder").buildURL({})).setMethod("POST").setData({create_test_app:!0,parent_app_id:(e=f==null?void 0:f.id)!=null?e:"",basic_name:b,app_creation_source:"dfc_modal_test_app_creation"}).setServerDialogCancelHandler(function(e){L(!1)}).setErrorHandler(function(e){r("AsyncResponse").defaultErrorHandler(e),L(!1)}).send()},k=s._(/*BTDS*/"Create test app for {app name}",[s._param("app name",f==null?void 0:f.name)]);return c.jsx(r("GeoModal_DEPRECATED.react"),{footer:c.jsx(r("GeoModalFooter.react"),{primaryButton:c.jsx(r("GeoButton.react"),{isDisabled:R,isLoading:R,label:"Confirm",onClick:E,variant:"primary"}),secondaryButton:c.jsx(r("GeoCancelButton.react"),{"data-testid":void 0})}),header:c.jsx(r("GeoModalHeader.react"),{heading:k}),isShown:l,label:k,onHide:u,children:c.jsxs(r("GeoSection.react"),{children:[c.jsxs("div",{children:[c.jsx(r("GeoText.react"),{children:s._(/*BTDS*/"Test apps allow you to debug and test changes in development without affecting the behavior of your production app.")}),c.jsx(r("HelpLink.react"),{alignv:"bottom",href:g,target:"_blank",tooltip:"Learn more"})]}),c.jsx("div",{className:"_3-8y",children:c.jsx(r("GeoTextInput.react"),{label:s._(/*BTDS*/"Test app name"),onChange:function(t){return v(t)},placeholder:s._(/*BTDS*/"Test app name"),value:b})})]})})}y.displayName=y.name+" [from "+i.id+"]",l.default=y}),226);
-----
DeveloperTestAppCreateLazyModalQuery.graphql",["DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"appId"},{defaultValue:null,kind:"LocalArgument",name:"skip"}],t=[{kind:"Variable",name:"id",variableName:"appId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"DeveloperTestAppCreateLazyModalQuery",selections:[{condition:"skip",kind:"Condition",passingValue:!1,selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[r,o,{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"child_apps",plural:!0,selections:[o],storageKey:null}],type:"Application",abstractKey:null}],storageKey:null}]}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DeveloperTestAppCreateLazyModalQuery",selections:[{condition:"skip",kind:"Condition",passingValue:!1,selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,{kind:"InlineFragment",selections:[o,{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"child_apps",plural:!0,selections:[o,r],storageKey:null}],type:"Application",abstractKey:null}],storageKey:null}]}]},params:{id:n("DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation"),metadata:{},name:"DeveloperTestAppCreateLazyModalQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24870545112638502"}),null);
-----
-----
DeveloperTestAppCreateLazyModalQuery.graphql",["DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"appId"},{defaultValue:null,kind:"LocalArgument",name:"skip"}],t=[{kind:"Variable",name:"id",variableName:"appId"}],r={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"DeveloperTestAppCreateLazyModalQuery",selections:[{condition:"skip",kind:"Condition",passingValue:!1,selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{kind:"InlineFragment",selections:[r,o,{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"child_apps",plural:!0,selections:[o],storageKey:null}],type:"Application",abstractKey:null}],storageKey:null}]}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"DeveloperTestAppCreateLazyModalQuery",selections:[{condition:"skip",kind:"Condition",passingValue:!1,selections:[{alias:null,args:t,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},r,{kind:"InlineFragment",selections:[o,{alias:null,args:null,concreteType:"Application",kind:"LinkedField",name:"child_apps",plural:!0,selections:[o,r],storageKey:null}],type:"Application",abstractKey:null}],storageKey:null}]}]},params:{id:n("DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation"),metadata:{},name:"DeveloperTestAppCreateLazyModalQuery",operationKind:"query",text:null}}})();a.exports=e}),null);
-----
DeveloperTestAppCreateLazyModalQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24870545112638502"}),null);
-----