<template>
    <div>
        <p class="grid-element">{{ service.metadata.name }}</p>
        <p class="grid-element">{{ service.metadata.namespace }}</p>
        <p class="grid-element">{{ calcAge(service.metadata.creationTimestamp) }}</p>
        <p class="grid-element" v-if="service.spec">{{ service.spec.type }}</p>
    </div>
</template>

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

defineProps<{
    service: Service
}>();
</script>