<template>
    <div class="gap-6 grid-cols-4 grid p-6">
        <block title="Ausstehende Mitgliedsbeiträge">
            <div class="text-gray-100">
                <span class="text-xl mr-1 font-semibold" v-text="data.payments.amount"></span>
                <span class="text-sm" v-text="`von ${data.payments.users} / ${data.payments.all_users} Mitgliedern`"></span>
            </div>
        </block>
        <block title="Gruppierungs-Verteilung">
            <div v-for="group in data.groups" class="flex mt-2 items-center leading-none text-gray-100">
                <sprite class="w-4 h-4 mr-2" src="lilie" :class="`text-${group.slug}`"></sprite>
                <span v-text="group.name" class="flex-grow"></span>
                <span v-text="group.count"></span>
            </div>
        </block>
        <block title="Endende Schhnupperzeiten">
            <div v-for="member in data.ending_tries" class="flex mt-2 items-center leading-none text-gray-100">
                <span class="flex-grow" v-text="`${member.firstname} ${member.lastname}`"></span>
                <span class="mr-2 text-sm tex-gray-600" v-text="`${member.try_ends_at}`"></span>
                <span class="text-xs tex-gray-600" v-text="`${member.try_ends_at_human}`"></span>
            </div>
        </block>
    </div>
</template>

<script>
import App from '../../layouts/App';
import Block from './Block.vue';

export default {
    layout: App,

    components: { Block },

    props: {
        data: {},
        blocks: {}
    }

};
</script>
