<template>
    <div @click="() => viewIngressPopup.open()">
        <p class="grid-element">{{ ingress.metadata.name }}</p>
        <p class="grid-element">{{ ingress.metadata.namespace }}</p>
        <p class="grid-element">{{ ingress.spec.ingressClassName }}</p>
        <p class="grid-element">{{ ingress.spec.rules.length }}</p>
        <div class="grid-element action-buttons">
            <ActionButton>delete</ActionButton>
        </div>
        <IngressViewPopup :ingress="ingress" ref="viewIngressPopup"></IngressViewPopup>
    </div>
</template>

<script setup lang="ts">
import type { Ingress } from '~/classes/Ingress';
import IngressViewPopup from './view/IngressViewPopup.vue';

defineProps<{
    ingress: Ingress
}>();

const viewIngressPopup = ref();
</script>