<template>
    <TableComponent :loading="services == null">
        <div class="resource-container service-container">
            <div class="header">
                <p>Service</p>
                <p>Namespace</p>
                <p>Type</p>
                <p>Aktionen</p>
            </div>
            <ServiceComponent :service="service" v-for="service, index in services" class="resource" :class="{ even: index % 2 }"></ServiceComponent>
        </div>
    </TableComponent>
</template>

<script setup lang="ts">
import { ResourceRepo } from '~/classes/ResourceRepo';
import type { Service } from '~/classes/Service';

const services = ResourceRepo.init<Service>().load('services').get();
</script>

<style>
.service-container {
    grid-template-columns: auto auto 1fr auto;
}
</style>