"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[958],{10958:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var n=t(93150),o=t.n(n),s=t(99167);const i=async function({data:e,id:a},{refData:t}){const n=e.dataToExport||"data-columns";let i=t.table;"google-sheets"===n?i=t.googleSheets[e.refKey]||[]:"variable"===n&&(i=t.variables[e.variableName]||[],Array.isArray(i)||(i=[i],"csv"===e.type&&"object"!=typeof i[0]&&(i=[i])));const l=await o().permissions.contains({permissions:["downloads"]}),r=(0,s.ZP)(i,{...e,csvOptions:{delimiter:e.csvDelimiter||","},returnUrl:l});if(l){const a={filename:`${e.name||"unnamed"}${s.QZ[e.type].ext}`,conflictAction:e.onConflict||"uniquify"};await o().downloads.download({...a,url:r})}return{data:"",nextBlockId:this.getBlockConnections(a)}}}}]);