MWSDevicePresetRemoveCollectionModal.react",["fbt","CometRelayErrorHandling","GeoBaseModal.react","GeoButton.react","GeoCancelButton.react","GeoModalCard.react","GeoModalFooter.react","GeoModalHeader.react","GeoNotice.react","GeoSection.react","GeoToast.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicePresetRemoveCollectionModalFragment.graphql","MWSDevicePresetRemoveCollectionModalMutation.graphql","MWSDevicesStringUtils","QPLUserFlow","RelayHooks","qpl","react","useGeoToaster"],(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.useState;function a(a){var b;a=a.props;var e=a.appCollectionId,f=a.fragmentKey,g=a.name,i=a.onHide,j=d("RelayHooks").useFragment(p,f);a=c("useGeoToaster")();var k=a.add;f=n();a=f[0];var r=f[1];f=d("RelayHooks").useMutation(q);var s=f[0];f=f[1];b=m(function(){var a;c("QPLUserFlow").start(o);a=(a=(a=j.ordered_app_collections)==null?void 0:a.nodes.filter(function(a){return a.id!==e}).map(function(a){return a.id}))!=null?a:[];s({onCompleted:function(){c("QPLUserFlow").endSuccess(o),k(l.jsx(c("GeoToast.react"),{heading:h._(/*BTDS*/"u5e94u7528u96c6u5df2u79fbu9664"),status:"success"})),i("layerHideButton")},onError:function(a){d("MMAQPLUserFlow").endCancelOrFailure(o,a),d("CometRelayErrorHandling").markErrorAsHandled(a),r(d("MWSDevicesStringUtils").Q4B_GENERIC_ERROR_MESSAGE)},variables:{input:{device_config_id:j.id,ordered_app_collection_ids:a}}})},[(b=j.ordered_app_collections)==null?void 0:b.nodes,j.id,s,e,k,i]);return l.jsx(c("GeoBaseModal.react"),{isShown:!0,onHide:i,children:l.jsx(c("GeoModalCard.react"),{"data-testid":void 0,footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{isDisabled:f,label:h._(/*BTDS*/"u786eu8ba4"),onClick:b,variant:"primary"}),secondaryButton:l.jsx(c("GeoCancelButton.react"),{"data-testid":void 0,isDisabled:f})}),header:l.jsx(c("GeoModalHeader.react"),{heading:h._(/*BTDS*/"u79fbu9664u5e94u7528u96c6")}),children:l.jsx(c("GeoSection.react"),{children:l.jsxs(c("GeoVStack.react"),{context:"container",relation:"related",children:[l.jsx(c("GeoNotice.react"),{status:"warning",children:h._(/*BTDS*/"u5e94u7528u96c6u201c{=m3}u201du5c06u4eceu9884u8bbeu4e2du79fbu9664u3002",[h._implicitParam("=m3",l.jsx("strong",{children:h._(/*BTDS*/"{name}",[h._param("name",g)])}))])}),a!=null&&l.jsx(c("GeoNotice.react"),{status:"error",children:a})]})})})})}a.displayName=a.name+" [from "+f.id+"]";var o=c("qpl")._(440731677,"2584"),p=i!==void 0?i:i=b("MWSDevicePresetRemoveCollectionModalFragment.graphql"),q=j!==void 0?j:j=b("MWSDevicePresetRemoveCollectionModalMutation.graphql");g["default"]=a}),226);
-----
MWSDevicePresetRemoveCollectionModalMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="9345330585576733"}),null);
-----