import{$ as e,Gt as t,nt as n,sn as r,vn as i}from"./src-DTHkTkyy-Ce1TZuRw.js";import{a}from"./connect-BSkeWkEI-BYzoVZOI.js";import{t as o}from"./useTranslation-D1YdOuD6.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l(){let l=t(),u=l?.type===`exportDocumentWithErrors`,[d]=i(u?l.documentId:void 0),{t:f}=o();if(!d)return null;let p=r(d);return s(a,{header:f(`modals.exportDocumentWithErrors.title`),title:f(`modals.exportDocumentWithErrors.title`),body:c(`div`,{children:[s(`p`,{children:f(`modals.exportDocumentWithErrors.body`)}),s(`ul`,{className:`mt-4 flex list-disc flex-col items-start px-4 text-xs`,children:p.map((e,t)=>s(`li`,{children:e.message},t))})]}),cancelLabel:f(`common.cancel`),continueLabel:f(`common.export`),onCancel:()=>e(),onContinue:async()=>{try{await n(d)}catch(e){console.error(e)}finally{e()}},open:u,onOpenChange:t=>{if(!t)return e()}})}export{l as ExportDocumentWithErrorsModal};
//# sourceMappingURL=ExportDocumentWithErrorsModal-DNRr3cjI-B-a0o9LA.js.map