useMWSCreateCustomIntegrationWebhookMutation",["CometRelay","useMWSCreateCustomIntegrationWebhookMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;function a(a){var c=d("CometRelay").useMutation(h!==void 0?h:h=b("useMWSCreateCustomIntegrationWebhookMutation.graphql")),e=c[0];c=c[1];var f=function(b){var c=b.onCompleted,d=b.onError;b=b.variables;var f=b.callback_url;f=f===void 0?"":f;var g=b.deleteWebhook;g=g===void 0?!1:g;b=b.verify_token;b=b===void 0?"":b;e({onCompleted:c,onError:d,variables:{input:{callback_url:g?"":f,use_mtls:!1,verify_token:g?"":b,work_custom_install_id:a}}})};return[f,c]}g["default"]=a}),98);
-----
MWSCustomIntegrationsConfigureWebhooksDialog.react",["fbt","CometRelayErrorHandling","CometRouteParams","GeoButton.react","GeoFlexbox.react","GeoLink.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoTextInput.react","GeoToast.react","GeoVStack.react","MWSCustomIntegrationsConfigureWebhooksDeleteDialog.react","geoMargin","isValidHttpURL","react","useGeoToaster","useMWSCreateCustomIntegrationWebhookMutation"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react")),k=i.useState;function a(a){var b=a.callbackUrl;b=b===void 0?"":b;var e=a.editSubscription,f=e===void 0?!1:e,g=a.onHide;e=d("CometRouteParams").useRouteParams();a=String(e.install_id);e=k(!1);var i=e[0],l=e[1],m=function(a){return g(a)};e=c("useGeoToaster")();var n=e.add;e=c("useMWSCreateCustomIntegrationWebhookMutation")(a);var o=e[0];e=e[1];b=k(b!=null?b:"");var p=b[0];b=b[1];var q=k(""),r=q[0],s=q[1];q=k(null);var t=q[0],u=q[1];q=function(){o({onCompleted:function(){n(f?j.jsx(c("GeoToast.react"),{heading:h._(/*BTDS*/"Webhook subscription edited"),status:"success"}):j.jsx(c("GeoToast.react"),{heading:h._(/*BTDS*/"Webhook subscription successfully created"),status:"success"})),g("layerCancelButton")},onError:function(a){d("CometRelayErrorHandling").markErrorAsHandled(a),u(a.description)},variables:{callback_url:p,verify_token:r}})};return i?j.jsx(c("MWSCustomIntegrationsConfigureWebhooksDeleteDialog.react"),{installId:a,onHide:g,setIsDialogShown:l}):j.jsx(c("GeoModal.react"),{footer:j.jsx(c("GeoModalFooter.react"),{primaryButton:j.jsx(c("GeoButton.react"),{isDisabled:!c("isValidHttpURL")(p)||!r||r.length<1||e,isLoading:e,label:h._(/*BTDS*/"Verify and save"),onClick:q,variant:"primary"}),secondaryButton:j.jsx(c("GeoButton.react"),{isDisabled:e,label:h._(/*BTDS*/"Cancel"),onClick:function(){return m("layerCancelButton")}}),startContent:f&&j.jsx(c("GeoFlexbox.react"),{alignItems:"center",direction:"row",gap:8,children:j.jsx(c("GeoLink.react"),{onClick:function(){l(!0)},children:h._(/*BTDS*/"Delete subscription")})})}),header:j.jsx(c("GeoModalHeader.react"),{heading:f?h._(/*BTDS*/"Edit your subscription"):h._(/*BTDS*/"Set up your subscription")}),hideOnBlur:!1,isShown:!0,onHide:m,children:j.jsxs(c("GeoVStack.react"),{context:"content",relation:"paragraph",xstyle:c("geoMargin").horiz16,children:[j.jsx(c("GeoTextInput.react"),{isValid:c("isValidHttpURL")(p),label:h._(/*BTDS*/"Callback URL"),onChange:b,placeholder:h._(/*BTDS*/"Webhook notifications will be sent to this URL"),value:p}),j.jsx(c("GeoTextInput.react"),{errorMessage:t,label:h._(/*BTDS*/"Verification token"),onChange:function(a){a=a.trim().replace(/[^a-zA-Z0-9_]/g,"");s(a);u(null)},placeholder:h._(/*BTDS*/"Token that Meta will echo back as part of callback URL verification"),tooltip:h._(/*BTDS*/"The token should be in the format of alphanumeric characters and underscores"),value:r})]})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
useMWSCreateCustomIntegrationWebhookMutation.graphql",["useMWSCreateCustomIntegrationWebhookMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{kind:"Variable",name:"data",variableName:"input"}],d={alias:null,args:null,concreteType:"WorkPlatformTsEventCustomInstallWebhookFieldSettings",kind:"LinkedField",name:"mma_webhook_setting",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"callback",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useMWSCreateCustomIntegrationWebhookMutation",selections:[{alias:null,args:c,concreteType:"AdminSetMmaWebhookTopicSettingsResponsePayload",kind:"LinkedField",name:"admin_set_mma_webhook_topic_settings",plural:!1,selections:[{alias:null,args:null,concreteType:"WorkCustomInstall",kind:"LinkedField",name:"work_custom_install",plural:!1,selections:[d],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useMWSCreateCustomIntegrationWebhookMutation",selections:[{alias:null,args:c,concreteType:"AdminSetMmaWebhookTopicSettingsResponsePayload",kind:"LinkedField",name:"admin_set_mma_webhook_topic_settings",plural:!1,selections:[{alias:null,args:null,concreteType:"WorkCustomInstall",kind:"LinkedField",name:"work_custom_install",plural:!1,selections:[d,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}],storageKey:null}]},params:{id:b("useMWSCreateCustomIntegrationWebhookMutation_facebookRelayOperation"),metadata:{},name:"useMWSCreateCustomIntegrationWebhookMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
MWSCustomIntegrationsConfigureWebhooksDeleteDialog.react",["fbt","GeoButton.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoText.react","GeoToast.react","GeoVStack.react","geoMargin","react","useGeoToaster","useMWSCreateCustomIntegrationWebhookMutation"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||d("react");function a(a){var b=a.installId,d=a.onHide,e=a.setIsDialogShown;a=c("useGeoToaster")();var f=a.add;a=c("useMWSCreateCustomIntegrationWebhookMutation")(b);var g=a[0];b=a[1];a=function(){g({onCompleted:function(){f(j.jsx(c("GeoToast.react"),{heading:h._(/*BTDS*/"Webhook subscription deleted"),status:"success"})),d("layerCancelButton")},onError:function(){f(j.jsx(c("GeoToast.react"),{heading:h._(/*BTDS*/"Failed to delete webhook subscription. Please try again."),status:"error"}))},variables:{deleteWebhook:!0}})};return j.jsx(c("GeoModal.react"),{footer:j.jsx(c("GeoModalFooter.react"),{primaryButton:j.jsx(c("GeoButton.react"),{isDisabled:b,isLoading:b,label:h._(/*BTDS*/"Delete"),onClick:a,variant:"primary"}),secondaryButton:j.jsx(c("GeoButton.react"),{isDisabled:b,label:h._(/*BTDS*/"Cancel"),onClick:function(){return e(!1)}})}),header:j.jsx(c("GeoModalHeader.react"),{heading:h._(/*BTDS*/"Delete this webhook subscription?")}),hideOnBlur:!1,isShown:!0,onHide:function(){return e(!1)},children:j.jsx(c("GeoVStack.react"),{context:"content",relation:"paragraph",xstyle:c("geoMargin").horiz16,children:j.jsx(c("GeoText.react"),{children:h._(/*BTDS*/"By deleting this webhook subscription your API will stop receiving automatic activity log updates.")})})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
useMWSCreateCustomIntegrationWebhookMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="9690209841075017"}),null);
-----