Module 882863

487 characters · in 4cfc13822fe4076f.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{A:()=>d});var i=n(64700),l=n(157559),s=n(845584),r=n(306522),a=n(975807),o=n(375708);function d(e,t){let[n,d]=i.useState(!1);return{isLoading:n,downloadAttachment:i.useCallback(async n=>{if(null!=e&&null!=t){d(!0);try{let{url:i}=await r.P0({guildId:e,productId:t,attachmentId:n});await (0,a.A)(i)}catch(t){let e=t instanceof s.LG?t.getAnyErrorMessage():void 0;l.A.show({title:o.intl.string(o.t.R0RpRX),body:e??o.intl.string(o.t.eAn6z2)})}finally{d(!1)}}},[e,t])}}}