const i=Vue.defineComponent({__name:"totalRow",setup(N){const s=n=>{const{columns:u,data:e}=n,a=[];return u.forEach((b,t)=>{if(t===0){a[t]="Total Cost";return}const r=e.map(o=>Number(o[b.property]));r.every(o=>Number.isNaN(o))?a[t]="N/A":a[t]=`$ ${r.reduce((o,l)=>{const d=Number(l);return Number.isNaN(d)?o:o+l},0)}`}),a},m=[{id:"12987122",name:"Tom",amount1:"234",amount2:"3.2",amount3:10},{id:"12987123",name:"Tom",amount1:"165",amount2:"4.43",amount3:12},{id:"12987124",name:"Tom",amount1:"324",amount2:"1.9",amount3:9},{id:"12987125",name:"Tom",amount1:"621",amount2:"2.2",amount3:17},{id:"12987126",name:"Tom",amount1:"539",amount2:"4.1",amount3:15}],p=[{label:"ID",prop:"id"},{label:"Name",prop:"name"},{label:"Amount 1",prop:"amount1",sortable:!0},{label:"Amount 2",prop:"amount2",sortable:!0},{label:"Amount 3",prop:"amount3",sortable:!0}],c=[{label:"ID",prop:"id"},{label:"Name",prop:"name"},{label:"Cost 1 ($)",prop:"amount1"},{label:"Cost 2 ($)",prop:"amount2"},{label:"Cost 3 ($)",prop:"amount3"}];return(n,u)=>{const e=Vue.resolveComponent("pure-table");return Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.createVNode(e,{data:m,columns:p,border:"","show-summary":"",class:"mb-6"}),Vue.createVNode(e,{data:m,columns:c,border:"","summary-method":s,"show-summary":""})],64)}}});export{i as _};
