import{r as o,d as l,B as t,h as i}from"./p-03169580.js";import{f as a}from"./p-cf4a3445.js";const e="floodteam-totaller-cards .flex-container{display:flex;flex-wrap:wrap}floodteam-totaller-cards ion-card{min-width:6rem;max-width:10rem;min-height:6rem;padding:0px 10px 10px 10px;flex-basis:18%}floodteam-totaller-cards h1{font-size:1rem;color:var(--ion-text-color)}floodteam-totaller-cards h2{font-size:.8rem;color:var(--ion-text-color)}floodteam-totaller-cards h3{font-size:.6rem}@media only screen and (max-width:415.9px){floodteam-totaller-cards .flex-container{justify-content:space-evenly}}";let r=class{constructor(t){o(this,t);this.fireenjinFetch=l(this,"fireenjinFetch",7)}async onSuccess(o){var l,t;if(o.detail.endpoint==="findTotaller"){this.totaller=((t=(l=o===null||o===void 0?void 0:o.detail)===null||l===void 0?void 0:l.data)===null||t===void 0?void 0:t.totaller)||null}}formatValue(o,l){return(l===null||l===void 0?void 0:l.format)==="usd"?a(o):o}async fetchTotaller(){this.fireenjinFetch.emit({endpoint:"findTotaller",params:{id:this.totallerId}})}async componentDidLoad(){if(!(t===null||t===void 0?void 0:t.isBrowser))return;this.fetchTotaller()}render(){var o,l;return i("div",null,i("u",null,(o=this===null||this===void 0?void 0:this.totaller)===null||o===void 0?void 0:o.name),i("div",{class:"flex-container"},Object.entries(((l=this.totaller)===null||l===void 0?void 0:l.sums)||{}).map((([o,l])=>{var t;return i("ion-card",{class:"card"},i("h2",null,l===null||l===void 0?void 0:l.name),i("h3",null,l===null||l===void 0?void 0:l.description),i("h1",null,this.formatValue(((t=this.totals)===null||t===void 0?void 0:t[o])||0,l)))}))))}};r.style=e;export{r as floodteam_totaller_cards};
//# sourceMappingURL=p-9f3de779.entry.js.map