<template>
    <div>
        <p class="grid-element" v-if="service.metadata">{{ service.metadata.name }}</p>
        <p class="grid-element" v-if="service.metadata">{{ service.metadata.namespace }}</p>
        <p class="grid-element" v-if="service.spec">{{ service.spec.type }}</p>
        <div class="grid-element">
            <ActionButton v-if="hasAnyRole(getUser(), ['admin', 'maintainer'])">delete</ActionButton>
        </div>
    </div>
</template>

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

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