"use strict";(globalThis.webpackChunk_openmrs_esm_ward_app=globalThis.webpackChunk_openmrs_esm_ward_app||[]).push([["239"],{39838:function(e,t,r){r.d(t,{Z:()=>i});var n=r(49130),a=r.n(n),s=r(22577),o=r.n(s)()(a());o.push([e.id,".-esm-ward__patient-transfer-request__patientTransferRequestWorkspace___6lAbq{height:100%;display:flex;flex-direction:column}","",{version:3,sources:["webpack://./src/ward-workspace/patient-transfer-request-workspace/patient-transfer-request.scss"],names:[],mappings:"AAAA,8EACE,WAAA,CACA,YAAA,CACA,qBAAA",sourcesContent:[".patientTransferRequestWorkspace {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n}\n"],sourceRoot:""}]),o.locals={patientTransferRequestWorkspace:"-esm-ward__patient-transfer-request__patientTransferRequestWorkspace___6lAbq"};let i=o},6360:function(e,t,r){r.r(t),r.d(t,{default:()=>E});var n=r(27350),a=r.n(n),s=r(68892),o=r(93798),i=r(56414),l=r(65951),c=r(46062),u=r.n(c),p=r(44036),f=r.n(p),d=r(96793),h=r.n(d),w=r(17892),b=r.n(w),m=r(11173),A=r.n(m),_=r(42464),k=r.n(_),v=r(39838),y={};y.styleTagTransform=k(),y.setAttributes=b(),y.insert=h().bind(null,"head"),y.domAPI=f(),y.insertStyleElement=A(),u()(v.Z,y);let T=v.Z&&v.Z.locals?v.Z.locals:void 0;function q(e,t,r,n,a,s,o){try{var i=e[s](o),l=i.value}catch(e){r(e);return}i.done?t(l):Promise.resolve(l).then(n,a)}let E=function(e){var t=e.workspaceProps.wardPatient,r=e.closeWorkspace,n=(0,s.useTranslation)().t,c="TRANSFER"==t.inpatientRequest.dispositionType;return a().createElement(o.Workspace2,{title:c?n("transferElsewhere","Transfer elsewhere"):n("admitElsewhere","Admit elsewhere")},a().createElement("div",{className:T.patientTransferRequestWorkspace},a().createElement(l.default,{wardPatient:t}),a().createElement(i.Z,{wardPatient:t,onSuccess:function(){var e;return(e=function(){return function(e,t){var r,n,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(l){var c=[i,l];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){s.label=c[1];break}if(6===c[0]&&s.label<a[1]){s.label=a[1],a=c;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(c);break}a[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,r({discardUnsavedChanges:!0})];case 1:return e.sent(),(0,o.closeWorkspaceGroup2)(),[2]}})},function(){var t=this,r=arguments;return new Promise(function(n,a){var s=e.apply(t,r);function o(e){q(s,n,a,o,i,"next",e)}function i(e){q(s,n,a,o,i,"throw",e)}o(void 0)})})()},onCancel:function(){return r()}})))}}}]);