1import{j as s}from"./vendor-query-CniT1WJL.js";import{bg as b,q as y,G as n,P as x,M as p,t as v,V as h,bh as N}from"./index-KjAD5lCC.js";import{r as k,L as C}from"./vendor-react-69GsFwrV.js";import{a as g}from"./AccountSection-B7Ueu1lP.js";import{u as z,C as I,a as P}from"./CompanyPortalShell-S13F8qfG.js";import{ao as f,i as j,aE as Q}from"./vendor-ui-Ad3ANzF6.js";import"./vendor-forms-q6h4WU-p.js";import"./AccountNav-CGK2802V.js";function B(){const{access:t,enabled:o}=z(),[c,l]=k.useState(()=>({organizationId:t.organizationId,backStack:[]})),m=c.organizationId===t.organizationId?c:{organizationId:t.organizationId,cursor:void 0,backStack:[]},d=m.cursor,r=m.backStack,u={limit:25,cursor:d},i=b(u,{query:{enabled:o,queryKey:N(u),placeholderData:e=>e}}),a=i.data;return s.jsx(I,{title:"Quotes",children:i.isLoading?s.jsx("div",{className:"space-y-3","aria-busy":"true",children:[0,1,2].map(e=>s.jsx(y,{className:"h-28 rounded-card"},e))}):o?i.isError||!a?s.jsx(P,{message:"We could not load company quotes."}):a.quotes.length===0?s.jsx(n,{children:s.jsx(g,{icon:f,message:"No issued company quotes",hint:"Quotes appear here after they are issued to this business account.",bordered:!1})}):s.jsxs(s.Fragment,{children:[s.jsx("section",{className:"space-y-3","aria-label":"Company quotes",children:a.quotes.map(e=>s.jsx(C,{href:`/account/company/quotes/${e.id}`,className:"block rounded-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsx(n,{className:"motion-safe:transition-[transform,box-shadow] hover:-translate-y-0.5 hover:shadow-lg",children:s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("h2",{className:"font-display text-t3 text-ink",children:e.quoteNumber}),s.jsx(x,{variant:e.status==="accepted"||e.status==="converted"?"mint":"neutral",className:"capitalize",children:e.status.replaceAll("_"," ")}),s.jsxs(x,{variant:"outline",children:["Version ",e.currentVersion]})]}),s.jsxs("p",{className:"mt-1 text-caption text-ink-3",children:["Issued ",p(e.issuedAt),e.validUntil?` · Valid through ${p(e.validUntil)}`:""]}),e.purchaseOrderNumber?s.jsxs("p",{className:"mt-1 text-caption text-ink-2",children:["PO ",e.purchaseOrderNumber]}):null]}),s.jsxs("div",{className:"flex items-center justify-between gap-4 sm:block sm:text-right",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-overline uppercase text-ink-3",children:"Quote total"}),s.jsx("p",{className:"font-mono text-t3 font-bold text-ink tabular-nums",children:v(e.totals.totalQuoteCents)})]}),s.jsx(j,{className:"size-5 text-primary sm:ml-auto sm:mt-2","aria-hidden":"true"})]})]})})},e.id))}),r.length>0||a.nextCursor?s.jsxs("nav",{"aria-label":"Quote pages",className:"mt-5 flex items-center justify-between gap-3",children:[s.jsxs(h,{type:"button",size:"sm",variant:"ghost",disabled:r.length===0||i.isFetching,onClick:()=>{l({organizationId:t.organizationId,cursor:r.at(-1),backStack:r.slice(0,-1)})},children:[s.jsx(Q,{className:"size-4","aria-hidden":"true"}),"Previous"]}),s.jsxs(h,{type:"button",size:"sm",variant:"ghost",disabled:!a.nextCursor||i.isFetching,onClick:()=>{a.nextCursor&&l({organizationId:t.organizationId,cursor:a.nextCursor,backStack:[...r,d]})},children:["Next",s.jsx(j,{className:"size-4","aria-hidden":"true"})]})]}):null]}):s.jsx(n,{children:s.jsx(g,{icon:f,message:"No company account",hint:"Company quotes appear here once you are a member of a business account.",bordered:!1})})})}export{B as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.