import{u as x,ah as p,aA as h,ac as j,ci as w,b4 as P,h as t,j as e,ae as T,S as g,T as r,I as d,aP as v,bf as b,dc as I}from"./bundle.CHKSNOJF.js";import{I as N}from"./InvoiceViewer-DkbHIsNq.js";import{a as _}from"./queries-DWVKzI9Y.js";function S(){const[s]=x(),n=p(),c=h(),{documentTitle:o}=j("view_pdf"),{id:i}=w(),{data:a,isLoading:l}=_({id:i}),m=I({resourceType:"credit"}),u=P({resource:"credit"}),f=[{name:s("credits"),href:"/credits"},{name:s("edit_credit"),href:t("/credits/:id/edit",{id:i})},{name:s("pdf"),href:t("/credits/:id/pdf",{id:i})}];return e.jsxs(T,{title:o,breadcrumbs:f,navigationTopRight:a&&e.jsxs("div",{className:"flex space-x-3",children:[c("edit_credit")&&e.jsxs(r,{className:"flex items-center space-x-1",onClick:()=>n(t("/credits/:id/email",{id:a.id})),children:[e.jsx(d,{element:v,color:"white"}),e.jsx("span",{children:s("email_credit")})]}),e.jsxs(r,{className:"flex items-center space-x-1",onClick:()=>u(a),children:[e.jsx(d,{element:b,color:"white"}),e.jsx("span",{children:s("download")})]})]}),children:[l&&e.jsx(g,{}),a&&e.jsx(N,{link:m(a),method:"GET"})]})}export{S as default};
