import{$ as e,Gt as t,Mt as n,Y as r,nn as i,qt as a,tn as o,wt as s}from"./src-DTHkTkyy-Ce1TZuRw.js";import{d as c}from"./connect-BSkeWkEI-BYzoVZOI.js";import{jsx as l}from"react/jsx-runtime";var u=()=>{let u=t(),d=u?.type===`createDocument`,f=n(d?u.documentType:void 0),[p]=o(),m=i(),h=a();return l(c,{open:d,onContinue:async t=>{e(),!(!p||!f)&&s(await r(p.header.id,t||`New ${f.documentModel.global.name}`,f.documentModel.global.id,m?.id??h?.id))},onOpenChange:t=>{if(!t)return e()}})};export{u as CreateDocumentModal};
//# sourceMappingURL=CreateDocumentModal-TtG7E62x-DhIMJdyw.js.map