<template>
    <PodComponent v-if="resource === 'pods'"></PodComponent>
    <CustomResourceDefinitionComponent v-else-if="resource === 'custom-resource-definitions'"></CustomResourceDefinitionComponent>
    <IngressComponent v-else-if="resource === 'ingresses'"></IngressComponent>
    <ServiceComponent v-else-if="resource === 'services'"></ServiceComponent>
    <DeploymentComponent v-else-if="resource === 'deployments'"></DeploymentComponent>
    <NodeComponent v-else-if="resource === 'nodes'"></NodeComponent>
    <SecretComponent v-else-if="resource === 'secrets'"></SecretComponent>
    <p v-else>Invalid resource</p>
</template>

<script setup lang="ts">
import PodComponent from '~/components/inspect/resources/PodComponent.vue';
import CustomResourceDefinitionComponent from '~/components/inspect/resources/CustomResourceDefinitionComponent.vue';
import IngressComponent from '~/components/inspect/resources/IngressComponent.vue';
import ServiceComponent from '~/components/inspect/resources/ServiceComponent.vue';
import DeploymentComponent from '~/components/inspect/resources/DeploymentComponent.vue';
import NodeComponent from '~/components/inspect/resources/NodeComponent.vue';
import SecretComponent from '~/components/inspect/resources/SecretComponent.vue';

const resource = useRoute().params.resource as string;
</script>