RoboticsSafetyV2DockWaitModal.react",["ix","CurrentUser","DateTime","GeoFlexbox.react","GeoSpinner.react","Image.react","Pressable.react","RelayHooks","RoboticsDesignSystemButton.react","RoboticsDesignSystemText.react","RoboticsROSArdioInterface","RoboticsSafetyV2DockWaitModalQuery.graphql","RoboticsSafetyV2DockWaitModalUpdateTaskMutation.graphql","RoboticsSafetyV2Selectors","RoboticsSafetyV2StateContainer","RoboticsStateContainerROSModuleActions","Timezone","react","useRoboticsLazyLoadQuery"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react")),m=k.useState,n=i!==void 0?i:i=b("RoboticsSafetyV2DockWaitModalUpdateTaskMutation.graphql"),o=j!==void 0?j:j=b("RoboticsSafetyV2DockWaitModalQuery.graphql");function a(a){var b=a.handleResume,e=a.handleShowWaitModal,f=a.setHoldExpirationTime,g=a.setIsUsePauseFallback,i=d("RoboticsSafetyV2StateContainer").useDispatch();a=c("CurrentUser").getID();var j=d("RoboticsSafetyV2StateContainer").useTopic(d("RoboticsROSArdioInterface").ROSTopic.Battery,d("RoboticsSafetyV2Selectors").getBatteryStatus),k=j.isCharging;j=m(!1);var q=j[0],r=j[1];j=c("useRoboticsLazyLoadQuery")(o,{query_params:{robot_id:a,source:"ARDIO"}});a=j[0].tasks;var s=a==null?void 0:a.nodes.find(function(a){return a.source==="ARDIO"});j=d("RelayHooks").useMutation(n);var t=j[0],u=function(a){var b;r(!0);k||i(d("RoboticsStateContainerROSModuleActions").rosServiceRequested({serviceName:d("RoboticsROSArdioInterface").ROSService.Resume,requestPayload:null}));t({onError:function(){g(!0),f(c("DateTime").now(d("Timezone").UTC).addHours(a).instant),r(!1),e(!1)},onCompleted:function(){r(!1),e(!1)},variables:{input:{task_record_ids:[(b=s==null?void 0:s.id)!=null?b:""],expiration_time:c("DateTime").now(d("Timezone").UTC).addHours(a).instant,need_dock:!k}}})};return l.jsx(c("GeoFlexbox.react"),{xstyle:p.root,justifyContent:"center",children:l.jsxs(c("GeoFlexbox.react"),{xstyle:p.modal,justifyContent:"space-between",direction:"column",children:[l.jsxs(c("GeoFlexbox.react"),{xstyle:p.fullWidth,justifyContent:"space-between",alignItems:"start",columnGap:18,children:[l.jsxs(c("GeoFlexbox.react"),{direction:"column",rowGap:12,children:[l.jsxs(c("GeoFlexbox.react"),{columnGap:18,children:[l.jsx(c("RoboticsDesignSystemText.react"),{size:"extra_small",weight:"emphasized",children:"Select wait duration at dock"}),q&&l.jsx(c("GeoSpinner.react"),{})]}),l.jsx(c("RoboticsDesignSystemText.react"),{size:"extra_small",children:"Other pending jobs cannot be processed while waiting at dock"})]}),l.jsx(c("GeoFlexbox.react"),{shrink:0,children:l.jsx(c("GeoFlexbox.react"),{xstyle:p.closeButton,alignItems:"center",justifyContent:"center",children:l.jsx(c("Pressable.react"),{xstyle:p.pressable,accessibilityRole:"button",onPress:function(){e(!1)},children:l.jsx(c("GeoFlexbox.react"),{xstyle:p.crossIcon,justifyContent:"center",alignItems:"center",children:l.jsx(c("Image.react"),{src:h("1270829")})})})})})]}),l.jsx(c("GeoFlexbox.react"),{xstyle:p.selectionButtons,children:[1,4,8].map(function(a){return l.jsx(c("RoboticsDesignSystemButton.react"),{direction:"column",onPress:function(){u(a)},children:l.jsx(c("RoboticsDesignSystemText.react"),{size:"extra_small",weight:"emphasized",children:a+" hour"+(a>1?"s":"")})},a)})}),l.jsx(c("GeoFlexbox.react"),{xstyle:p.fullWidth,children:l.jsx(c("RoboticsDesignSystemButton.react"),{use:"primary",direction:"column",onPress:function(){e(!1),b()},children:l.jsx(c("RoboticsDesignSystemText.react"),{size:"extra_small",color:"light",weight:"emphasized",textAlign:"center",children:"Cancel and release immediately"})})})]})})}a.displayName=a.name+" [from "+f.id+"]";var p={root:{backgroundColor:"x1964rl4",height:"x5yr21d",width:"xh8yej3",position:"x10l6tqk",zIndex:"x1vjfegm",top:"x13vifvy",$$css:!0},fullWidth:{width:"xh8yej3",$$css:!0},modal:{backgroundColor:"x12peec7",borderStartStartRadius:"xbjudin",borderStartEndRadius:"xnlwouz",borderEndEndRadius:"xpp8er5",borderEndStartRadius:"xs9wviy",boxSizing:"x9f619",marginTop:"xqui205",marginInlineEnd:"xpwdb9g",marginBottom:"x1hq5gj4",marginInlineStart:"xefazk8",paddingTop:"x109j2v6",paddingInlineEnd:"x64bnmy",paddingBottom:"x1hhzuzn",paddingInlineStart:"x13jy36j",$$css:!0},pressable:{display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xl56j7k",height:"x5yr21d",$$css:!0},closeButton:{boxSizing:"x9f619",borderStartStartRadius:"xbjudin",borderStartEndRadius:"xnlwouz",borderEndEndRadius:"xpp8er5",borderEndStartRadius:"xs9wviy",cursor:"x1ypdohk",":active_transform":"xk4oym4",":active_boxShadow":"x1iqhkd5",$$css:!0},crossIcon:{backgroundColor:"x39viwf",borderStartStartRadius:"x1c9tyrk",borderStartEndRadius:"xeusxvb",borderEndEndRadius:"x1pahc9y",borderEndStartRadius:"x1ertn4p",height:"xy75621",width:"xni59qk",$$css:!0},selectionButtons:{columnGap:"x18hwk67",width:"xh8yej3",$$css:!0}};g["default"]=a}),98);
-----
RoboticsSafetyV2DockWaitModalUpdateTaskMutation.graphql",["RoboticsSafetyV2DockWaitModalUpdateTaskMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:"task",args:[{kind:"Variable",name:"params",variableName:"input"}],concreteType:"RobotTaskRecord",kind:"LinkedField",name:"xfb_robotics_update_robot_task_record",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"RoboticsSafetyV2DockWaitModalUpdateTaskMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"RoboticsSafetyV2DockWaitModalUpdateTaskMutation",selections:c},params:{id:b("RoboticsSafetyV2DockWaitModalUpdateTaskMutation_facebookRelayOperation"),metadata:{},name:"RoboticsSafetyV2DockWaitModalUpdateTaskMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
RoboticsSafetyV2DockWaitModalUpdateTaskMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24353367507605006"}),null);
-----