"use strict";(globalThis.webpackChunk_openmrs_esm_laboratory_app=globalThis.webpackChunk_openmrs_esm_laboratory_app||[]).push([["4316"],{1031(e,r,t){t.r(r),t.d(r,{default:()=>s});var n=t(2153),o=t.n(n),a=t(6045),l=t(3485),i=t(4803),u=t(4091);function c(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}let s=function(e){var r,t=e.order,s=e.closeModal,d=(0,a.useTranslation)().t,p=function(e){if(Array.isArray(e))return e}(r=(0,n.useState)(!1))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),2!==o.length);a=!0);}catch(e){l=!0,t=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw t}}return o}}(r)||function(e){if(e){if("string"==typeof e)return c(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=p[0],y=p[1],b=(0,i.useAbortController)(),m=(0,u.b5)();return o().createElement("div",null,o().createElement(l.rQ0,{closeModal:s,title:d("pickRequest","Pick lab request")}),o().createElement(l.cwr,null,o().createElement("p",null,d("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:s},d("discard","Discard")),o().createElement(l.$nd,{type:"submit",onClick:function(){y(!0),(0,u.Or)(t.uuid,"IN_PROGRESS",b).then(function(){m(),y(!1),s(),(0,i.showSnackbar)({isLowContrast:!0,title:d("pickedAnOrder","Picked an order"),kind:"success",subtitle:d("orderPickedSuccessfully","You have successfully picked an order")})},function(e){y(!1),(0,i.showNotification)({title:d("errorPickingOrder","Error picking order"),kind:"error",critical:!0,description:null==e?void 0:e.message})})},disabled:f},d("pickupLabRequest","Pick up lab request"))))}}}]);