import{r as e}from"./chunk-QTnfLwEv.js";import{o as t}from"./jsx-runtime-DHSfUA5-.js";import{P as n}from"./test.id-DxQrYxPk.js";import{n as r}from"./fileAssetService-gA4Q8V3n.js";var i=e(t(),1);function a(e,t){let a=n(r),[o,s]=(0,i.useState)(),c=e?.type===`video`?e.thumbS3Key:e?.thumbS3Key??e?.s3Key;return(0,i.useEffect)(()=>{let e=!1;if(s(void 0),c)return a.getFileUrl(c,{role:t.role}).then(t=>{e||s(t)}).catch(()=>{e||s(void 0)}),()=>{e=!0}},[a,c,t.role]),o}export{a as t};
//# sourceMappingURL=useAttachmentThumbUrl-D6z1SOlU.js.map