import { MemoryRouter as Router, Routes, Route } from 'react-router-dom';
import { MainLayout } from '@/components/layout/main-layout';
import { Dashboard } from '@/components/pages/dashboard';
import { NodesPage } from '@/components/pages/nodes';
import { NodeDetailsPage } from '@/components/pages/node-details';
import { NamespacesPage } from '@/components/pages/namespaces';
import { NamespaceDetailsPage } from '@/components/pages/namespace-details';
import { DeploymentsPage } from '@/components/pages/deployments';
import { DeploymentDetailsPage } from '@/components/pages/deployment-details';
import { StatefulSetsPage } from '@/components/pages/statefulsets';
import { StatefulSetImportPage } from '@/components/pages/statefulset-import';
import { StatefulSetImportECSPage } from '@/components/pages/statefulset-import-ecs';
import { DaemonSetsPage } from '@/components/pages/daemonsets';
import { HPAsPage } from '@/components/pages/hpas';
import HPACreatePage from '@/components/pages/hpa-create';
import HPADetailsPage from '@/components/pages/hpa-details';
import { DaemonSetDetailsPage } from '@/components/pages/daemonset-details';
import { PodsPage } from '@/components/pages/pods';
import { JobsPage } from '@/components/pages/jobs';
import { CronJobsPage } from '@/components/pages/cronjobs';
import { CronJobDetailsPage } from '@/components/pages/cronjob-details';
import { PodDetailsPage } from '@/components/pages/pod-details';
import { JobDetailsPage } from '@/components/pages/job-details';
import { DeploymentImportPage } from '@/components/pages/deployment-import';
import { DeploymentImportECSPage } from '@/components/pages/deployment-import-ecs';
import { DaemonSetImportPage } from '@/components/pages/daemonset-import';
import { DaemonSetImportECSPage } from '@/components/pages/daemonset-import-ecs';
import { IngressesPage } from '@/components/pages/ingresses';
import { IngressDetailsPage } from '@/components/pages/ingress-details';
import IngressCreatePage from '@/components/pages/ingress-create';
import IngressCreateSimplePage from '@/components/pages/ingress-create-simple';
import IngressCreateTlsPage from '@/components/pages/ingress-create-tls';
import IngressCreateLetsEncryptTraefikPage from '@/components/pages/ingress-create-letsencrypt-traefik';
import IngressCreateLetsEncryptNginxPage from '@/components/pages/ingress-create-letsencrypt-nginx';
import IngressCreateAdvancedPage from '@/components/pages/ingress-create-advanced';
import { ServicesPage } from '@/components/pages/services';
import { ServiceDetailsPage } from '@/components/pages/service-details';
import ServiceCreatePage from '@/components/pages/service-create';
import ServiceCreateClusterIPPage from '@/components/pages/service-create-clusterip';
import ServiceCreateNodePortPage from '@/components/pages/service-create-nodeport';
import ServiceCreateLoadBalancerPage from '@/components/pages/service-create-loadbalancer';
import ServiceCreateExternalNamePage from '@/components/pages/service-create-externalname';
import ServiceCreateHeadlessPage from '@/components/pages/service-create-headless';
import ConfigMapsPage from '@/components/pages/configmaps';
import { ConfigMapDetailsPage } from '@/components/pages/configmap-details';
import ConfigMapCreatePage from '@/components/pages/configmap-create';
import ConfigMapImportPage from '@/components/pages/configmap-import';
import ConfigMapImportEnvPage from '@/components/pages/configmap-import-env';
import ConfigMapImportJsonPage from '@/components/pages/configmap-import-json';
import ConfigMapImportYamlPage from '@/components/pages/configmap-import-yaml';
import ConfigMapImportPropertiesPage from '@/components/pages/configmap-import-properties';
import ConfigMapImportIniPage from '@/components/pages/configmap-import-ini';
import ConfigMapImportUrlPage from '@/components/pages/configmap-import-url';
import { SecretsPage } from '@/components/pages/secrets';
import { SecretDetailsPage } from '@/components/pages/secret-details';
import SecretCreatePage from '@/components/pages/secret-create';
import { SecretCreateGenericPage } from '@/components/pages/secret-create-generic';
import { SecretCreateDockerRegistryPage } from '@/components/pages/secret-create-docker-registry';
import SecretCreateTLSPage from '@/components/pages/secret-create-tls';
import SecretCreateSSHPage from '@/components/pages/secret-create-ssh';
import SecretCreateBasicAuthPage from '@/components/pages/secret-create-basic-auth';
import SecretCreateServiceAccountPage from '@/components/pages/secret-create-service-account';
import SecretImportPage from '@/components/pages/secret-import';
import SecretImportEnvPage from '@/components/pages/secret-import-env';
import SecretImportJsonPage from '@/components/pages/secret-import-json';
import SecretImportYamlPage from '@/components/pages/secret-import-yaml';
import SecretImportPropertiesPage from '@/components/pages/secret-import-properties';
import SecretImportUrlPage from '@/components/pages/secret-import-url';
import { KubeconfigSettingsPage } from '@/components/pages/kubeconfig-settings';
import { KubeconfigWizardPage } from '@/components/pages/kubeconfig-wizard';
import DeploymentCreatePage from '@/components/pages/deployment-create';
import DeploymentCreateSimplePage from '@/components/pages/deployment-create-simple';
import DeploymentCreateWebappPage from '@/components/pages/deployment-create-webapp';
import DeploymentCreateApiPage from '@/components/pages/deployment-create-api';
import DeploymentCreateDatabasePage from '@/components/pages/deployment-create-database';
import DeploymentCreateWorkerPage from '@/components/pages/deployment-create-worker';
import DeploymentCreateAdvancedPage from '@/components/pages/deployment-create-advanced';

export default function App() {
  return (
    <Router>
      <MainLayout>
        <Routes>
          <Route path="/" element={<Dashboard />} />
          <Route path="/cluster/nodes" element={<NodesPage />} />
          <Route
            path="/cluster/nodes/:nodeName"
            element={<NodeDetailsPage />}
          />
          <Route path="/cluster/namespaces" element={<NamespacesPage />} />
          <Route
            path="/cluster/namespaces/:namespaceName"
            element={<NamespaceDetailsPage />}
          />
          <Route path="/workloads/deployments" element={<DeploymentsPage />} />
          <Route
            path="/workloads/deployments/import"
            element={<DeploymentImportPage />}
          />
          <Route
            path="/workloads/deployments/import/ecs"
            element={<DeploymentImportECSPage />}
          />
          <Route
            path="/workloads/deployments/create"
            element={<DeploymentCreatePage />}
          />
          <Route
            path="/workloads/deployments/create/simple"
            element={<DeploymentCreateSimplePage />}
          />
          <Route
            path="/workloads/deployments/create/webapp"
            element={<DeploymentCreateWebappPage />}
          />
          <Route
            path="/workloads/deployments/create/api"
            element={<DeploymentCreateApiPage />}
          />
          <Route
            path="/workloads/deployments/create/database"
            element={<DeploymentCreateDatabasePage />}
          />
          <Route
            path="/workloads/deployments/create/worker"
            element={<DeploymentCreateWorkerPage />}
          />
          <Route
            path="/workloads/deployments/create/advanced"
            element={<DeploymentCreateAdvancedPage />}
          />
          <Route
            path="/workloads/deployments/:namespaceName/:deploymentName"
            element={<DeploymentDetailsPage />}
          />
          <Route
            path="/workloads/statefulsets"
            element={<StatefulSetsPage />}
          />
          <Route
            path="/workloads/statefulsets/import"
            element={<StatefulSetImportPage />}
          />
          <Route
            path="/workloads/statefulsets/import/ecs"
            element={<StatefulSetImportECSPage />}
          />
          <Route path="/workloads/daemonsets" element={<DaemonSetsPage />} />
          <Route
            path="/workloads/daemonsets/import"
            element={<DaemonSetImportPage />}
          />
          <Route
            path="/workloads/daemonsets/import/ecs"
            element={<DaemonSetImportECSPage />}
          />
          <Route
            path="/workloads/daemonsets/:namespaceName/:daemonSetName"
            element={<DaemonSetDetailsPage />}
          />
          <Route path="/workloads/pods" element={<PodsPage />} />
          <Route path="/workloads/jobs" element={<JobsPage />} />
          <Route path="/workloads/cronjobs" element={<CronJobsPage />} />
          <Route path="/workloads/hpa" element={<HPAsPage />} />
          <Route path="/workloads/hpa/create" element={<HPACreatePage />} />
          <Route
            path="/workloads/hpa/:namespaceName/:hpaName"
            element={<HPADetailsPage />}
          />
          <Route
            path="/workloads/cronjobs/:namespaceName/:cronJobName"
            element={<CronJobDetailsPage />}
          />
          <Route
            path="/workloads/jobs/:namespaceName/:jobName"
            element={<JobDetailsPage />}
          />
          <Route
            path="/cluster/pods/:podName/:namespaceName"
            element={<PodDetailsPage />}
          />
          <Route
            path="/workloads/pods/:podName/:namespaceName"
            element={<PodDetailsPage />}
          />
          <Route
            path="/service-discovery/ingresses"
            element={<IngressesPage />}
          />
          <Route
            path="/service-discovery/ingresses/create"
            element={<IngressCreatePage />}
          />
          <Route
            path="/service-discovery/ingresses/create/simple"
            element={<IngressCreateSimplePage />}
          />
          <Route
            path="/service-discovery/ingresses/create/tls"
            element={<IngressCreateTlsPage />}
          />
          <Route
            path="/service-discovery/ingresses/create/letsencrypt-traefik"
            element={<IngressCreateLetsEncryptTraefikPage />}
          />
          <Route
            path="/service-discovery/ingresses/create/letsencrypt-nginx"
            element={<IngressCreateLetsEncryptNginxPage />}
          />
          <Route
            path="/service-discovery/ingresses/create/advanced"
            element={<IngressCreateAdvancedPage />}
          />
          <Route
            path="/service-discovery/ingresses/:namespaceName/:ingressName"
            element={<IngressDetailsPage />}
          />
          <Route
            path="/service-discovery/services"
            element={<ServicesPage />}
          />
          <Route
            path="/service-discovery/services/create"
            element={<ServiceCreatePage />}
          />
          <Route
            path="/service-discovery/services/create/clusterip"
            element={<ServiceCreateClusterIPPage />}
          />
          <Route
            path="/service-discovery/services/create/nodeport"
            element={<ServiceCreateNodePortPage />}
          />
          <Route
            path="/service-discovery/services/create/loadbalancer"
            element={<ServiceCreateLoadBalancerPage />}
          />
          <Route
            path="/service-discovery/services/create/externalname"
            element={<ServiceCreateExternalNamePage />}
          />
          <Route
            path="/service-discovery/services/create/headless"
            element={<ServiceCreateHeadlessPage />}
          />
          <Route
            path="/service-discovery/services/:namespaceName/:serviceName"
            element={<ServiceDetailsPage />}
          />
          <Route path="/storage/configmaps" element={<ConfigMapsPage />} />
          <Route
            path="/storage/configmaps/new"
            element={<ConfigMapCreatePage />}
          />
          <Route
            path="/storage/configmaps/import"
            element={<ConfigMapImportPage />}
          />
          <Route
            path="/storage/configmaps/import/env"
            element={<ConfigMapImportEnvPage />}
          />
          <Route
            path="/storage/configmaps/import/json"
            element={<ConfigMapImportJsonPage />}
          />
          <Route
            path="/storage/configmaps/import/yaml"
            element={<ConfigMapImportYamlPage />}
          />
          <Route
            path="/storage/configmaps/import/properties"
            element={<ConfigMapImportPropertiesPage />}
          />
          <Route
            path="/storage/configmaps/import/ini"
            element={<ConfigMapImportIniPage />}
          />
          <Route
            path="/storage/configmaps/import/url"
            element={<ConfigMapImportUrlPage />}
          />
          <Route
            path="/storage/configmaps/:namespaceName/:configMapName"
            element={<ConfigMapDetailsPage />}
          />
          <Route path="/storage/secrets" element={<SecretsPage />} />
          <Route path="/secrets/new" element={<SecretCreatePage />} />
          <Route
            path="/secrets/new/generic"
            element={<SecretCreateGenericPage />}
          />
          <Route
            path="/secrets/new/docker-registry"
            element={<SecretCreateDockerRegistryPage />}
          />
          <Route path="/secrets/new/tls" element={<SecretCreateTLSPage />} />
          <Route
            path="/secrets/new/ssh-auth"
            element={<SecretCreateSSHPage />}
          />
          <Route
            path="/secrets/new/basic-auth"
            element={<SecretCreateBasicAuthPage />}
          />
          <Route
            path="/secrets/new/service-account-token"
            element={<SecretCreateServiceAccountPage />}
          />
          <Route
            path="/storage/secrets/import"
            element={<SecretImportPage />}
          />
          <Route
            path="/storage/secrets/import/env"
            element={<SecretImportEnvPage />}
          />
          <Route
            path="/storage/secrets/import/json"
            element={<SecretImportJsonPage />}
          />
          <Route
            path="/storage/secrets/import/yaml"
            element={<SecretImportYamlPage />}
          />
          <Route
            path="/storage/secrets/import/properties"
            element={<SecretImportPropertiesPage />}
          />
          <Route
            path="/storage/secrets/import/url"
            element={<SecretImportUrlPage />}
          />
          <Route
            path="/storage/secrets/:namespaceName/:secretName"
            element={<SecretDetailsPage />}
          />
          <Route
            path="/settings/kubeconfigs"
            element={<KubeconfigSettingsPage />}
          />
          <Route
            path="/settings/kubeconfigs/add"
            element={<KubeconfigWizardPage />}
          />
        </Routes>
      </MainLayout>
    </Router>
  );
}
