import{I as p,c as a,f as l,u as s,o as i,b as o,t as d}from"./app-B4kV47qU.js";import{u}from"./chatStore-CTtmOQOw.js";import"./toastComposable-CvcyPmJb.js";import"./echoServiceComposable-n1MnmRL6.js";import"./modalStore-BgORG3Nn.js";const m={key:0,class:"absolute -top-[140px] right-2 z-40"},f={class:"flex gap-2"},c=["src"],g=["href"],x={__name:"MediaPreview",setup(_){const{inputMessage:e}=p(u());return(r,t)=>s(e).file?(i(),a("div",m,[o("div",f,[["image/jpeg","image/jpg","image/png"].includes(s(e).type)?(i(),a("img",{key:0,class:"h-32 w-32 rounded-md border shadow-md",src:s(e).url,alt:"media-img"},null,8,c)):["application/pdf","text/csv","application/xls"].includes(s(e).type)?(i(),a("a",{key:1,target:"_blank",class:"flex items-center gap-3 rounded border p-3",href:s(e).url},[t[1]||(t[1]=o("i",{class:"fa-solid fa-file-pdf"},null,-1)),o("p",null,d(s(e).file_caption),1)],8,g)):l("",!0),o("button",{type:"button",onClick:t[0]||(t[0]=(...n)=>r.removeFile&&r.removeFile(...n))},t[2]||(t[2]=[o("i",{class:"fa-solid fa-trash"},null,-1)]))])])):l("",!0)}};export{x as default};
