import{u as d,ci as r,a as c,aA as m,b_ as u,j as s,C as p,di as y,e as x,dj as f,O as h,ak as j}from"./bundle.CHKSNOJF.js";import{b}from"./payments-C1sjF6lG.js";function C(){const[l]=d(),{id:e}=r(),t=c(),{data:a}=b({id:e}),n=m(),o=u(),i=()=>{j(["payments"])};return s.jsx(p,{title:l("documents"),className:"shadow-sm",style:{borderColor:t.$24},headerStyle:{borderColor:t.$20},children:s.jsxs("div",{className:h("flex w-full px-4 sm:px-6 py-2",{"flex-col items-center":e}),children:[s.jsx("div",{className:"w-full",children:s.jsx(y,{endpoint:x("/api/v1/payments/:id/upload",{id:e}),onSuccess:i,disableUpload:!n("edit_payment")&&!o(a),widgetOnly:!0})}),s.jsx("div",{className:"w-full",children:s.jsx(f,{documents:a?.documents??[],onDocumentDelete:i,disableEditableOptions:!o(a,!0)&&!n("edit_payment")})})]})})}export{C as default};
