import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./useTranslation-B_YCgyrR.js";import{t as n}from"./jsx-runtime-CTknu7_t.js";import{n as r}from"./StatusColorTheme-C6Iyd2V-.js";import{t as i}from"./Badge-BFQliKBR.js";var a=function(e){return e.Viewed=`-1`,e.Draft=`1`,e.Sent=`2`,e.Accepted=`3`,e.Received=`4`,e.Cancelled=`5`,e}({}),o=e(n());function s(e){let[n]=t(),{status_id:s,archived_at:c,is_deleted:l,invitations:u}=e.entity,d=r(),f=()=>u.some(e=>e.viewed_date),p=s===a.Draft,m=!p,h=f(),g=s===a.Cancelled,_=s===a.Accepted;return l?(0,o.jsx)(i,{variant:`red`,children:n(`deleted`)}):c?(0,o.jsx)(i,{variant:`orange`,children:n(`archived`)}):g?(0,o.jsx)(i,{variant:`purple`,style:{backgroundColor:d.$5},children:n(`cancelled`)}):s===a.Received?(0,o.jsx)(i,{variant:`green`,style:{backgroundColor:d.$3},children:n(`received`)}):_?(0,o.jsx)(i,{variant:`dark-blue`,style:{backgroundColor:d.$2},children:n(`accepted`)}):m?(0,o.jsx)(i,{variant:`light-blue`,style:{backgroundColor:d.$1},children:n(`sent`)}):p?(0,o.jsx)(i,{variant:`generic`,children:n(`draft`)}):h&&!g&&!_?(0,o.jsx)(i,{variant:`yellow`,style:{backgroundColor:d.$4},children:n(`viewed`)}):(0,o.jsx)(o.Fragment,{})}export{a as n,s as t};