import type SummaryStatsItem from './summary-stats-item';
import { toNative } from 'vue-facing-decorator';
import TsxComponent, { Component } from '../../app/vuetsx';
import './css/summary-stats.css';

interface SummaryStatsArgs {}

@Component
class SummaryStatsComponent extends TsxComponent<SummaryStatsArgs> implements SummaryStatsArgs {
	getChildItems(): typeof SummaryStatsItem.prototype[] {
		return this.getSlotProperties('SummaryStatsItem');
	}

	render(h) {
		return <div class={`row card-stats ` + `summarystat-${this.getChildItems().length}-items`}>{this.$slots.default?.()}</div>;
	}
}

const SummaryStats = toNative(SummaryStatsComponent);
export default SummaryStats;
