<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 === 'deployment'"></DeploymentComponent>
    <NodeComponent v-else-if="resource === 'nodes'"></NodeComponent>
    <SecretComponent v-else-if="resource === 'secrets'"></SecretComponent>
    <ConfigMapList v-else-if="resource === 'config-maps'"></ConfigMapList>
    <StatefulSetList v-else-if="resource === 'stateful-sets'"></StatefulSetList>
    <PersistentVolumeList v-else-if="resource === 'pvs'"></PersistentVolumeList>
    <PersistentVolumeClaimList v-else-if="resource === 'pvcs'"></PersistentVolumeClaimList>
    <NamespaceList v-else-if="resource === 'namespaces'"></NamespaceList>
    <p v-else>Invalid resource</p>
</template>

<script setup lang="ts">
import PodComponent from '~/components/inspect/resources/PodList.vue';
import CustomResourceDefinitionComponent from '~/components/inspect/resources/CustomResourceDefinitionList.vue';
import IngressComponent from '~/components/inspect/resources/IngressList.vue';
import ServiceComponent from '~/components/inspect/resources/ServiceList.vue';
import DeploymentComponent from '~/components/inspect/resources/DeploymentList.vue';
import NodeComponent from '~/components/inspect/resources/NodeList.vue';
import SecretComponent from '~/components/inspect/resources/SecretList.vue';
import ConfigMapList from '~/components/inspect/resources/ConfigMapList.vue';
import StatefulSetList from '~/components/inspect/resources/StatefulSetList.vue';
import PersistentVolumeList from '~/components/inspect/resources/PersistentVolumeList.vue';
import PersistentVolumeClaimList from '~/components/inspect/resources/PersistentVolumeClaimList.vue';
import NamespaceList from '~/components/inspect/resources/NamespaceList.vue';

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