import{t as e}from"./vendor-react-CAGJwf-T.js";import{t}from"./download-Nyfa5Abn.js";import{gt as n}from"./index-Z_bdWDpJ.js";var r=e();function i(e){if(!e||e<=0)return``;let t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`}function a({url:e,durationSeconds:a,variant:o=`inline`}){if(!e)return null;let s=i(a);return o===`compact`?(0,r.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,title:`Open recording`,className:`inline-flex items-center gap-1 text-[11px] text-[var(--color-primary)] hover:underline`,children:[(0,r.jsx)(n,{className:`w-3 h-3`}),`Recording `,s&&`· ${s}`]}):(0,r.jsxs)(`div`,{className:`mt-2 rounded-lg border border-[var(--color-border-light)] bg-slate-50/40 dark:bg-slate-900/30 p-2 flex items-center gap-3`,children:[(0,r.jsx)(`div`,{className:`flex items-center justify-center w-8 h-8 rounded-md bg-[var(--color-primary)]/10 text-[var(--color-primary)] shrink-0`,children:(0,r.jsx)(n,{className:`w-4 h-4`})}),(0,r.jsx)(`audio`,{controls:!0,preload:`metadata`,src:e,className:`flex-1 min-w-0 h-8`}),s&&(0,r.jsx)(`span`,{className:`text-[11px] text-[var(--color-text-muted)] tabular-nums whitespace-nowrap`,children:s}),(0,r.jsx)(`a`,{href:e,download:!0,target:`_blank`,rel:`noreferrer`,title:`Download recording`,className:`inline-flex items-center justify-center w-7 h-7 rounded-md text-[var(--color-text-muted)] hover:text-[var(--color-primary)] hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors`,children:(0,r.jsx)(t,{className:`w-3.5 h-3.5`})})]})}export{a as t};