import{r as e,b as t}from"./app-DTeOhhdM.js";import{S as f}from"./SingleView-CIASBRyC.js";import{requisitionSingleViewConfig as u}from"./requisitionSingleViewConfig-C0BYUweK.js";import w from"./PrintRequisition-C9UNq4jI.js";import g from"./PrintOutOfStock-fPt-ONUh.js";import"./AuthenticatedLayout-DNj-hWy1.js";import"./helper-Gzy5oJm-.js";import"./asyncToGenerator-BfWTt6ZC.js";import"./createLucideIcon-0QtVMxKe.js";import"./defualtLogo-C0dU5cUD.js";import"./SendForApprovalModal-D4xv6430.js";import"./inputtextarea.esm-Dd-bVwF0.js";import"./inputtext.esm-DvYkLvTo.js";import"./column.esm-CqBIx_TJ.js";import"./index.esm-xhUioO7y.js";import"./index.esm-BlFJNgmX.js";import"./index.esm-CVWS0Xy2.js";import"./checkbox.esm-BR_P7NMp.js";import"./toast.esm-CLj0hUIX.js";import"./ApprovalActionModal-PtHx0E0N.js";/* empty css                */function z({auth:i,requisition:o,userApprovalAssignment:p}){const[s,r]=e.useState(!1),[m,a]=e.useState("all"),n=(c="all")=>{a(c),r(!0),setTimeout(()=>{window.print(),setTimeout(()=>{r(!1)},500)},300)},l={...u,printConfig:{buttons:[{label:"Print",icon:"pi pi-print",onClick:()=>n("all"),className:"p-button-info p-button-sm"},{label:"Print Out of Stock",icon:"pi pi-exclamation-triangle",onClick:()=>n("outOfStock"),className:"p-button-warning p-button-sm"}]}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"print-view",children:m==="all"?t.jsx(w,{requisitionData:o,auth:i}):t.jsx(g,{requisition:o,auth:i})}),t.jsx(f,{auth:i,data:o,userApprovalAssignment:p,config:l})]})}export{z as default};
