import{r as p,b as t}from"./app-DTeOhhdM.js";import{S as m}from"./SingleView-CIASBRyC.js";import{salesSingleViewConfig as a}from"./salesSingleViewConfig-dZ2iS3u5.js";import c from"./Print-DLrzZfIl.js";import d from"./Print3Inch-DMbflCS3.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";import"./numberToWords.min-02Sh2OYb.js";import"./react-barcode-DkieryVx.js";import"./index-Chjiymov.js";function R({auth:o,sale:i}){const[r,n]=p.useState(!1),e=typeof window<"u"&&window.setting&&window.setting.invoice_print_mode?window.setting.invoice_print_mode:"a4",s={...a,printConfig:{label:"Print",icon:"pi pi-print",onPrint:async()=>{n(!0),setTimeout(async()=>{try{await document.fonts.load("16px ProseAntiqueBold"),await document.fonts.load("16px corsiva-regular"),await document.fonts.ready}catch{}window.print(),setTimeout(()=>{n(!1)},500)},300)},className:"p-button-info p-button-sm"}};return t.jsxs(t.Fragment,{children:[r&&i&&t.jsx("div",{className:"print-view print:block hidden",children:e==="pos_3inch"?t.jsx(d,{sales:i,auth:o}):t.jsx(c,{sales:i,auth:o})}),t.jsx(m,{auth:o,data:i,showApprovalActions:!1,config:s})]})}export{R as default};
