"use strict";(globalThis.webpackChunk_ampath_esm_laboratory_app=globalThis.webpackChunk_ampath_esm_laboratory_app||[]).push([[3535],{3535:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var n=r(16072),o=r.n(n),a=r(2076),l=r(73465),i=r(36920),u=r(90611);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const s=function(e){var t,r,s=e.order,d=e.closeModal,p=(0,a.useTranslation)().t,f=(t=(0,n.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw o}}return a}}(t,r)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=f[0],b=f[1],m=(0,i.useAbortController)(),h=(0,u.b5)();return o().createElement("div",null,o().createElement(l.rQ0,{closeModal:d,title:p("pickRequest","Pick lab request")}),o().createElement(l.cwr,null,o().createElement("p",null,p("pickRequestConfirmationText",'Continuing will update the request status to "In Progress" and advance it to the next stage. Are you sure you want to proceed?'))),o().createElement(l.jlY,null,o().createElement(l.$nd,{kind:"secondary",onClick:d},p("discard","Discard")),o().createElement(l.$nd,{type:"submit",onClick:function(){b(!0),(0,u.Or)(s.uuid,"IN_PROGRESS",m).then(function(){h(),b(!1),d(),(0,i.showSnackbar)({isLowContrast:!0,title:p("pickedAnOrder","Picked an order"),kind:"success",subtitle:p("orderPickedSuccessfully","You have successfully picked an order")})},function(e){b(!1),(0,i.showNotification)({title:p("errorPickingOrder","Error picking order"),kind:"error",critical:!0,description:null==e?void 0:e.message})})},disabled:y},p("pickupLabRequest","Pick up lab request"))))}}}]);