const e={alerts:process.env.DUB_SLACK_HOOK_ALERTS,cron:process.env.DUB_SLACK_HOOK_CRON,errors:process.env.DUB_SLACK_HOOK_ERRORS,links:process.env.DUB_SLACK_HOOK_LINKS,payouts:process.env.DUB_SLACK_HOOK_PAYOUTS},t=async({message:t,type:n,mention:r=!1})=>{console.log(t);let i=e[n];if(i)try{return await fetch(i,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({blocks:[{type:`section`,text:{type:`mrkdwn`,text:`${r?`<@U0404G6J3NJ> `:``}${n===`alerts`||n===`errors`?`:alert: `:``}${t}`}}]})})}catch(e){console.log(`Failed to log to Dub Slack. Error: ${e}`)}};export{t};
//# sourceMappingURL=log-B19eGrt5.mjs.map