<template>
    <TableComponent :loading="pods == null">
        <div class="resource-container pod-container">
            <div class="header">
                <p>Pod</p>
                <p>Namespace</p>
                <p>Alter</p>
                <p>Node</p>
                <p>Status</p>
                <p>Aktionen</p>
            </div>
            <PodComponent v-for="pod, index in pods" :pod="pod" class="resource" :class="{ even: index % 2 }"></PodComponent>
        </div>
    </TableComponent>
</template>

<script setup lang="ts">
import type { Pod } from '~/classes/Pod';
import { ResourceRepo } from '~/classes/ResourceRepo';
import PodComponent from '~/components/pod/PodComponent.vue';

const pods = ResourceRepo.init<Pod>().load('pods').get();
</script>