import{s as f}from"./sharedComposable-VJJUONp6.js";import{l as m,r as h,c as n,o as c,b as e,a as p,t as a,u as v,j as l,F as i}from"./app-B4kV47qU.js";import"./toastComposable-CvcyPmJb.js";const w={class:"card grid w-full grid-cols-8 p-1.5"},y={class:"col-span-6 flex flex-col items-start justify-start leading-4"},b={class:"-mt-0.5 text-left text-sm"},k={class:"text-left"},D={class:"text-[10px] text-gray-400"},B={class:"text-end text-[10px] text-gray-400"},C={class:"mt-1 p-1 text-sm leading-3"},j={__name:"DocumentPreview",props:["meta"],setup(d){const s=d,u=m(()=>{var o,t;return((o=s.meta)==null?void 0:o.document_name)||((t=s.meta)==null?void 0:t.document)||"document"}),x=m(()=>s.meta.caption||"Your caption will appear here"),_=o=>{const t=o.split(".");return t[t.length-1]},{textExcerpt:g}=f();return(o,t)=>{const r=h("Icon");return c(),n("div",null,[e("div",w,[p(r,{icon:"bx:file",class:"col-span-1 text-lg"}),e("div",y,[e("p",b,a(v(g)(u.value,20)),1),e("p",k,[e("span",D,a(new Date().toLocaleTimeString()),1),t[0]||(t[0]=l(" . ",-1)),e("span",B,[s.meta.document?(c(),n(i,{key:0},[l(a(_(s.meta.document_name||s.meta.document)),1)],64)):(c(),n(i,{key:1},[l(a(o.trans("html")),1)],64))])])]),p(r,{icon:"bx:download",class:"col-span-1 text-lg"})]),e("p",C,a(x.value),1)])}}};export{j as default};
