Module 666171

483 characters · in 2f9baa53e1c5e105.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),a=n(157559),l=n(198982),r=n(306522),s=n(922482),o=n(985018);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 s.R(i)}catch(t){let e=t instanceof l.LG?t.getAnyErrorMessage():void 0;a.A.show({title:o.intl.string(o.t.R0RpRX),body:e??o.intl.string(o.t.eAn6z2)})}finally{d(!1)}}},[e,t])}}}