<template>
    <div>
        <p class="grid-element">{{ configMap.metadata.name }}</p>
        <p class="grid-element">{{ configMap.metadata.namespace }}</p>
        <p class="grid-element">{{ calcAge(configMap.metadata.creationTimestamp) }}</p>
        <p class="grid-element"><span v-if="configMap.data">{{ Object.keys(configMap.data).length }}</span><span v-else>-</span></p>
        <div class="grid-element">
            <ActionButton>delete</ActionButton>
        </div>
    </div>
</template>

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

defineProps<{
    configMap: ConfigMap
}>();
</script>