/**
 * @file Sidebar configuration for documentation entries.
 *
 * @import { SidebarItemConfig } from "@docusaurus/plugin-content-docs/src/sidebars/types.js"
 */

import * as path from "node:path";
import { fileURLToPath } from "node:url";

import {
    collectReleaseFiles,
    createReleaseSidebarEntries,
    prepareReleaseEnvironment,
} from "@goauthentik/docusaurus-theme/releases/node";

const __dirname = fileURLToPath(new URL(".", import.meta.url));

const releases = collectReleaseFiles(path.join(__dirname));
const releaseEnvironment = prepareReleaseEnvironment();

/**
 * @type {SidebarItemConfig[]}
 */
const items = [
    {
        type: "doc",
        id: "index",
    },
    {
        //#region Core Concepts
        type: "category",
        label: "Core Concepts",
        collapsed: true,
        items: [
            {
                type: "autogenerated",
                dirName: "core/glossary",
            },
            "core/architecture",
        ],
    },
    {
        //#endregion

        //#region Enterprise
        type: "category",
        label: "Enterprise",
        collapsed: true,
        link: {
            type: "doc",
            id: "enterprise/index",
        },
        items: [
            "enterprise/get-started",
            "enterprise/enterprise-features",
            "enterprise/manage-enterprise",
            "enterprise/enterprise-support",
        ],
    },
    {
        //#endregion

        //#region Installation and Configuration
        type: "category",
        label: "Installation and Configuration",
        collapsed: true,
        link: {
            type: "doc",
            id: "install-config/index",
        },
        items: [
            {
                //#endregion

                //#region Installation
                type: "category",
                label: "Installation",
                collapsed: true,
                items: [
                    "install-config/install/docker-compose",
                    "install-config/install/kubernetes",
                    "install-config/install/aws",
                ],
                //#endregion
            },
            {
                //#region Configuration
                type: "category",
                label: "Configuration",
                link: {
                    type: "doc",
                    id: "install-config/configuration/configuration",
                },
                items: [],
            },
            "install-config/first-steps/index",
            "install-config/email",
            "install-config/upgrade",
            "install-config/beta",
            "install-config/reverse-proxy",
            "install-config/automated-install",
            "install-config/high-availability",
            "install-config/air-gapped",
        ],
    },
    {
        //#endregion

        //#region Add and Secure Applications
        type: "category",
        label: "Add and Secure Applications",
        collapsed: true,
        items: [
            {
                //#endregion

                //#region Applications
                type: "category",
                label: "Applications",
                link: {
                    type: "doc",
                    id: "add-secure-apps/applications/index",
                },
                items: ["add-secure-apps/applications/manage_apps"],
            },
            {
                //#endregion

                //#region Providers
                type: "category",
                label: "Providers",
                link: {
                    type: "doc",
                    id: "add-secure-apps/providers/index",
                },
                items: [
                    {
                        type: "category",
                        label: "Property Mappings",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/property-mappings/index",
                        },
                        items: ["add-secure-apps/providers/property-mappings/expression"],
                    },
                    {
                        type: "category",
                        label: "Single Logout",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/single-logout/index",
                        },
                        items: [],
                    },
                    {
                        type: "category",
                        label: "Google Workspace Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/gws/index",
                        },
                        items: [
                            "add-secure-apps/providers/gws/configure-gws",
                            "add-secure-apps/providers/gws/create-gws-provider",
                        ],
                    },
                    {
                        type: "category",
                        label: "LDAP Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/ldap/index",
                        },
                        items: ["add-secure-apps/providers/ldap/create-ldap-provider"],
                    },
                    {
                        type: "category",
                        label: "Microsoft Entra ID Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/entra/index",
                        },
                        items: [
                            "add-secure-apps/providers/entra/configure-entra",
                            "add-secure-apps/providers/entra/create-entra-provider",
                        ],
                    },
                    {
                        type: "category",
                        label: "OAuth2 Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/oauth2/index",
                        },
                        items: [
                            "add-secure-apps/providers/oauth2/create-oauth2-provider",
                            "add-secure-apps/providers/oauth2/machine_to_machine",
                            "add-secure-apps/providers/oauth2/device_code",
                            "add-secure-apps/providers/oauth2/github-compatibility",
                            "add-secure-apps/providers/oauth2/frontchannel_and_backchannel_logout",
                            "add-secure-apps/providers/oauth2/webfinger_support",
                        ],
                    },
                    {
                        type: "category",
                        label: "Proxy Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/proxy/index",
                        },
                        items: [
                            "add-secure-apps/providers/proxy/custom_headers",
                            "add-secure-apps/providers/proxy/header_authentication",
                            {
                                type: "category",
                                label: "Forward authentication",
                                link: {
                                    type: "doc",
                                    id: "add-secure-apps/providers/proxy/forward_auth",
                                },
                                items: [
                                    "add-secure-apps/providers/proxy/server_nginx",
                                    "add-secure-apps/providers/proxy/server_traefik",
                                    "add-secure-apps/providers/proxy/server_envoy",
                                    "add-secure-apps/providers/proxy/server_caddy",
                                ],
                            },
                        ],
                    },
                    {
                        type: "category",
                        label: "RAC (Remote Access Control) Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/rac/index",
                        },
                        items: [
                            "add-secure-apps/providers/rac/create-rac-provider",
                            "add-secure-apps/providers/rac/rac-public-key",
                            "add-secure-apps/providers/rac/rac_credentials_prompt",
                        ],
                    },
                    "add-secure-apps/providers/radius/index",
                    {
                        type: "category",
                        label: "SAML Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/saml/index",
                        },
                        items: [
                            "add-secure-apps/providers/saml/create-saml-provider",
                            "add-secure-apps/providers/saml/saml_single_logout",
                        ],
                    },
                    "add-secure-apps/providers/scim/index",
                    {
                        type: "category",
                        label: "SSF Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/ssf/index",
                        },
                        items: ["add-secure-apps/providers/ssf/create-ssf-provider"],
                    },
                    {
                        type: "category",
                        label: "WS-Federation Provider",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/providers/wsfed/index",
                        },
                        items: ["add-secure-apps/providers/wsfed/create-wsfed-provider"],
                    },
                ],
            },
            {
                //#endregion

                //#region Flows and Stages
                type: "category",
                label: "Flows and Stages",
                collapsed: true,
                items: [
                    {
                        type: "category",
                        label: "Flows",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/flows-stages/flow/index",
                        },
                        items: [
                            "add-secure-apps/flows-stages/flow/inspector",
                            "add-secure-apps/flows-stages/flow/context/index",
                            {
                                type: "category",
                                label: "Defaults and Examples",
                                items: [
                                    "add-secure-apps/flows-stages/flow/examples/flows",
                                    "add-secure-apps/flows-stages/flow/examples/default_flows",
                                    "add-secure-apps/flows-stages/flow/examples/snippets",
                                ],
                            },
                            {
                                type: "category",
                                label: "Executors",
                                items: [
                                    "add-secure-apps/flows-stages/flow/executors/if-flow",
                                    "add-secure-apps/flows-stages/flow/executors/sfe",
                                    "add-secure-apps/flows-stages/flow/executors/user-settings",
                                    "add-secure-apps/flows-stages/flow/executors/headless",
                                ],
                            },
                        ],
                    },
                    {
                        type: "category",
                        label: "Stages",
                        link: {
                            type: "doc",
                            id: "add-secure-apps/flows-stages/stages/index",
                        },
                        items: [
                            "add-secure-apps/flows-stages/stages/authenticator_duo/index",
                            "add-secure-apps/flows-stages/stages/authenticator_email/index",
                            "add-secure-apps/flows-stages/stages/authenticator_endpoint_gdtc/index",
                            "add-secure-apps/flows-stages/stages/authenticator_sms/index",
                            "add-secure-apps/flows-stages/stages/authenticator_static/index",
                            "add-secure-apps/flows-stages/stages/authenticator_totp/index",
                            "add-secure-apps/flows-stages/stages/authenticator_validate/index",
                            "add-secure-apps/flows-stages/stages/authenticator_webauthn/index",
                            "add-secure-apps/flows-stages/stages/captcha/index",
                            "add-secure-apps/flows-stages/stages/consent/index",
                            "add-secure-apps/flows-stages/stages/deny",
                            "add-secure-apps/flows-stages/stages/email/index",
                            "add-secure-apps/flows-stages/stages/endpoint/index",
                            "add-secure-apps/flows-stages/stages/identification/index",
                            "add-secure-apps/flows-stages/stages/invitation/index",
                            "add-secure-apps/flows-stages/stages/mtls/index",
                            "add-secure-apps/flows-stages/stages/password/index",
                            "add-secure-apps/flows-stages/stages/prompt/index",
                            "add-secure-apps/flows-stages/stages/redirect/index",
                            "add-secure-apps/flows-stages/stages/source/index",
                            "add-secure-apps/flows-stages/stages/user_delete",
                            "add-secure-apps/flows-stages/stages/user_login/index",
                            "add-secure-apps/flows-stages/stages/user_logout",
                            "add-secure-apps/flows-stages/stages/user_write",
                        ],
                    },
                ],
            },
            {
                //#endregion

                //#region Bindings
                type: "category",
                label: "Bindings",
                link: {
                    type: "doc",
                    id: "add-secure-apps/bindings-overview/index",
                },
                items: ["add-secure-apps/bindings-overview/work-with-bindings"],
            },
            {
                //#endregion

                //#region Outposts
                type: "category",
                label: "Outposts",
                link: {
                    type: "doc",
                    id: "add-secure-apps/outposts/index",
                },
                items: [
                    "add-secure-apps/outposts/embedded/embedded",
                    {
                        type: "category",
                        label: "Integrations",
                        items: [
                            "add-secure-apps/outposts/integrations/docker",
                            "add-secure-apps/outposts/integrations/kubernetes",
                        ],
                    },
                    {
                        type: "category",
                        label: "Running and upgrading",
                        items: [
                            "add-secure-apps/outposts/manual-deploy-docker-compose",
                            "add-secure-apps/outposts/manual-deploy-kubernetes",
                            "add-secure-apps/outposts/upgrading",
                        ],
                    },
                ],
            },
        ],
    },
    {
        //#endregion

        //#region Customize your instance
        type: "category",
        label: "Customize your instance",
        collapsed: true,
        link: {
            type: "doc",
            id: "customize/index",
        },
        items: [
            {
                //#endregion

                //#region Policies
                type: "category",
                label: "Policies",
                collapsed: true,
                link: {
                    type: "doc",
                    id: "customize/policies/index",
                },
                items: [
                    "customize/policies/working_with_policies",
                    "customize/policies/bindings",
                    {
                        type: "category",
                        label: "Policy Types",
                        link: {
                            type: "doc",
                            id: "customize/policies/types/index",
                        },
                        items: [
                            "customize/policies/types/event-matcher",
                            {
                                type: "category",
                                label: "Expression Policies",
                                link: {
                                    type: "doc",
                                    id: "customize/policies/types/expression/index",
                                },
                                items: [
                                    "customize/policies/types/expression/reference",
                                    "customize/policies/types/expression/unique_email",
                                    "customize/policies/types/expression/managing_flow_context_keys",
                                    "customize/policies/types/expression/source_switch",
                                    "customize/policies/types/expression/whitelist_email",
                                ],
                            },
                            "customize/policies/types/geoip",
                            "customize/policies/types/password",
                            "customize/policies/types/password-expiry",
                            "customize/policies/types/password-uniqueness",
                            "customize/policies/types/reputation",
                        ],
                    },
                ],
            },
            {
                //#endregion

                //#region Interfaces
                type: "category",
                label: "Interfaces",
                items: [
                    "customize/interfaces/flow/index",
                    "customize/interfaces/user/index",
                    "customize/interfaces/admin/index",
                ],
            },
            {
                //#endregion

                //#region Blueprints
                type: "category",
                label: "Blueprints",
                link: {
                    type: "doc",
                    id: "customize/blueprints/index",
                },
                items: [
                    "customize/blueprints/working_with_blueprints",
                    "customize/blueprints/export",
                    "customize/blueprints/v1/structure",
                    "customize/blueprints/v1/tags",
                    "customize/blueprints/v1/example",
                    {
                        type: "category",
                        label: "Models",
                        link: {
                            type: "doc",
                            id: "customize/blueprints/v1/models",
                        },
                        items: ["customize/blueprints/v1/meta"],
                    },
                ],
            },
            "customize/branding",
            "customize/files",
            "customize/file-picker",
        ],
    },
    {
        //#endregion

        //#region Manage Users and Sources
        type: "category",
        label: "Manage Users and Sources",
        collapsed: true,
        items: [
            {
                //#endregion

                //#region Users
                type: "category",
                label: "Users",
                link: {
                    type: "doc",
                    id: "users-sources/user/index",
                },
                items: [
                    "users-sources/user/user_basic_operations",
                    "users-sources/user/user_ref",
                    "users-sources/user/invitations",
                    "users-sources/user/password_reset_on_login",
                    "users-sources/user/user-interface",
                ],
            },
            {
                //#endregion

                //#region Groups
                type: "category",
                label: "Groups",
                link: {
                    type: "doc",
                    id: "users-sources/groups/index",
                },
                items: ["users-sources/groups/manage_groups", "users-sources/groups/group_ref"],
            },
            {
                //#endregion

                //#region Roles
                type: "category",
                label: "Roles",
                link: {
                    type: "doc",
                    id: "users-sources/roles/index",
                },
                items: ["users-sources/roles/manage_roles"],
            },
            {
                //#endregion

                //#region Access Control
                type: "category",
                label: "Access Control",
                link: {
                    type: "doc",
                    id: "users-sources/access-control/index",
                },
                items: [
                    "users-sources/access-control/permissions",
                    "users-sources/access-control/manage_permissions",
                    "users-sources/access-control/initial_permissions",
                ],
            },
            {
                //#endregion

                //#region Federated and Social Sources
                type: "category",
                label: "Federated and Social Sources",
                collapsed: true,
                link: {
                    type: "doc",
                    id: "users-sources/sources/index",
                },
                items: [
                    {
                        type: "category",
                        label: "Protocols",
                        collapsed: true,
                        items: [
                            {
                                type: "category",
                                label: "Kerberos",
                                link: {
                                    type: "doc",
                                    id: "users-sources/sources/protocols/kerberos/index",
                                },
                                items: ["users-sources/sources/protocols/kerberos/browser"],
                            },
                            "users-sources/sources/protocols/ldap/index",
                            "users-sources/sources/protocols/oauth/index",
                            "users-sources/sources/protocols/saml/index",
                            "users-sources/sources/protocols/scim/index",
                        ],
                    },
                    {
                        type: "category",
                        label: "Source Property Mappings",
                        link: {
                            type: "doc",
                            id: "users-sources/sources/property-mappings/index",
                        },
                        items: ["users-sources/sources/property-mappings/expressions"],
                    },
                    {
                        type: "category",
                        label: "Directory synchronization",
                        items: [
                            "users-sources/sources/directory-sync/active-directory/index",
                            "users-sources/sources/directory-sync/freeipa/index",
                        ],
                    },
                    {
                        type: "category",
                        label: "Identity Providers",
                        link: {
                            type: "doc",
                            id: "users-sources/sources/social-logins/index",
                        },
                        items: [
                            "users-sources/sources/social-logins/apple/index",
                            "users-sources/sources/social-logins/discord/index",
                            {
                                type: "category",
                                label: "Entra ID",
                                link: {
                                    type: "doc",
                                    id: "users-sources/sources/social-logins/entra-id/index",
                                },
                                items: [
                                    "users-sources/sources/social-logins/entra-id/oauth/index",
                                    "users-sources/sources/social-logins/entra-id/scim/index",
                                ],
                            },
                            "users-sources/sources/social-logins/facebook/index",
                            "users-sources/sources/social-logins/github/index",
                            "users-sources/sources/social-logins/keycloak/index",
                            {
                                type: "category",
                                label: "Google",
                                link: {
                                    type: "doc",
                                    id: "users-sources/sources/social-logins/google/index",
                                },
                                items: [
                                    "users-sources/sources/social-logins/google/cloud/index",
                                    "users-sources/sources/social-logins/google/workspace/index",
                                ],
                            },
                            "users-sources/sources/social-logins/mailcow/index",
                            "users-sources/sources/social-logins/okta/index",
                            "users-sources/sources/social-logins/plex/index",
                            "users-sources/sources/social-logins/shibboleth/index",
                            "users-sources/sources/social-logins/telegram/index",
                            "users-sources/sources/social-logins/twitch/index",
                            "users-sources/sources/social-logins/twitter/index",
                            "users-sources/sources/social-logins/wechat/index",
                        ],
                    },
                ],
            },
        ],
    },
    {
        //#endregion

        //#region System Management
        type: "category",
        label: "System Management",
        collapsed: true,
        items: [
            "sys-mgmt/background-tasks",
            {
                type: "category",
                label: "Brands",
                collapsed: true,
                link: {
                    id: "sys-mgmt/brands/index",
                    type: "doc",
                },
                items: ["sys-mgmt/brands/index", "sys-mgmt/brands/custom-css"],
            },
            {
                //#endregion

                //#region Operations
                type: "category",
                label: "Operations",
                collapsed: true,
                items: [
                    "sys-mgmt/ops/monitoring",
                    "sys-mgmt/ops/worker",
                    "sys-mgmt/ops/storage-s3",
                    "sys-mgmt/ops/geoip",
                    "sys-mgmt/ops/backup-restore",
                ],
            },
            {
                //#endregion

                //#region Events
                type: "category",
                label: "Events",
                collapsed: true,
                link: {
                    type: "doc",
                    id: "sys-mgmt/events/index",
                },
                items: [
                    {
                        type: "category",
                        label: "Notification Rules",
                        collapsed: true,
                        link: {
                            id: "sys-mgmt/events/notifications",
                            type: "doc",
                        },
                        items: ["sys-mgmt/events/notification_rule_expression_policies"],
                    },
                    "sys-mgmt/events/transports",
                    "sys-mgmt/events/logging-events",
                    "sys-mgmt/events/event-actions",
                ],
            },
            "sys-mgmt/certificates",
            "sys-mgmt/settings",
            "sys-mgmt/service-accounts",
            "sys-mgmt/data-exports",
            "sys-mgmt/object-lifecycle-management",
        ],
    },
    {
        //#endregion

        //#region Endpoint Devices
        type: "category",
        label: "Endpoint Devices (Early Preview)",
        collapsed: true,
        link: {
            type: "doc",
            id: "endpoint-devices/index",
        },
        items: [
            {
                //#endregion

                //#region authentik Agent
                type: "category",
                label: "authentik Agent",
                collapsed: true,
                link: {
                    type: "doc",
                    id: "endpoint-devices/authentik-agent/index",
                },
                items: [
                    "endpoint-devices/authentik-agent/configuration",
                    {
                        //#endregion

                        //#region authentik Agent Deployment
                        type: "category",
                        label: "Deployment",
                        collapsed: true,
                        link: {
                            type: "doc",
                            id: "endpoint-devices/authentik-agent/agent-deployment/index",
                        },
                        items: [
                            "endpoint-devices/authentik-agent/agent-deployment/automated",
                            "endpoint-devices/authentik-agent/agent-deployment/linux",
                            "endpoint-devices/authentik-agent/agent-deployment/macos",
                            "endpoint-devices/authentik-agent/agent-deployment/windows",
                        ],
                    },
                    {
                        //#endregion

                        //#region Device Authentication
                        type: "category",
                        label: "Device authentication",
                        collapsed: true,
                        link: {
                            type: "doc",
                            id: "endpoint-devices/authentik-agent/device-authentication/index",
                        },
                        items: [
                            "endpoint-devices/authentik-agent/device-authentication/device-access-groups",
                            {
                                //#endregion

                                //#region local device login
                                type: "category",
                                label: "Local device login",
                                collapsed: true,
                                link: {
                                    type: "doc",
                                    id: "endpoint-devices/authentik-agent/device-authentication/local-device-login/index",
                                },
                                items: [
                                    "endpoint-devices/authentik-agent/device-authentication/local-device-login/linux",
                                    "endpoint-devices/authentik-agent/device-authentication/local-device-login/windows",
                                ],
                            },
                            "endpoint-devices/authentik-agent/device-authentication/ssh-authentication",
                            {
                                //#endregion

                                //#region cli app authentication
                                type: "category",
                                label: "CLI application authentication",
                                collapsed: true,
                                link: {
                                    type: "doc",
                                    id: "endpoint-devices/authentik-agent/device-authentication/cli-app-authentication/index",
                                },
                                items: [
                                    "endpoint-devices/authentik-agent/device-authentication/cli-app-authentication/aws",
                                    "endpoint-devices/authentik-agent/device-authentication/cli-app-authentication/k8s",
                                ],
                            },
                        ],
                    },
                    "endpoint-devices/authentik-agent/authentik-cli",
                    "endpoint-devices/authentik-agent/development",
                    {
                        //#endregion

                        //#region authentik Agent Release Notes
                        type: "category",
                        label: "Release notes",
                        description: "Release Notes for recent authentik agent versions",
                        collapsed: true,
                        link: {
                            type: "doc",
                            id: "endpoint-devices/authentik-agent/release-notes/index",
                        },
                        items: [
                            "endpoint-devices/authentik-agent/release-notes/v0.40",
                            "endpoint-devices/authentik-agent/release-notes/v0.35",
                        ],
                    },
                ],
            },
            "endpoint-devices/manage-devices",
            {
                //#endregion

                //#region Device Compliance
                type: "category",
                label: "Device compliance",
                collapsed: true,
                link: {
                    type: "doc",
                    id: "endpoint-devices/device-compliance/index",
                },
                items: [
                    "endpoint-devices/device-compliance/configuration",
                    {
                        //#endregion

                        //#region Connectors
                        type: "category",
                        label: "Connectors",
                        link: {
                            type: "doc",
                            id: "endpoint-devices/device-compliance/connectors/index",
                        },
                        items: [
                            "endpoint-devices/device-compliance/connectors/authentik-agent",
                            "endpoint-devices/device-compliance/connectors/fleetdm",
                            "endpoint-devices/device-compliance/connectors/google-chrome",
                        ],
                    },
                    "endpoint-devices/device-compliance/device-reporting",
                    "endpoint-devices/device-compliance/device-compliance-policy",
                    "endpoint-devices/device-compliance/browser-extension",
                ],
            },
        ],
    },
    {
        //#endregion

        //#region Developer Documentation
        type: "category",
        label: "Developer Documentation",
        collapsed: true,
        link: {
            type: "doc",
            id: "developer-docs/index",
        },
        items: [
            {
                type: "link",
                href: releaseEnvironment.apiReferenceOrigin,
                label: "API Overview",
                className: "api-overview",
            },
            {
                type: "doc",
                id: "developer-docs/contributing",
                label: "Contributing",
            },

            {
                //#endregion

                //#region Development environment
                type: "category",
                label: "Development environment",
                link: {
                    type: "doc",
                    id: "developer-docs/setup/index",
                },
                items: [
                    "developer-docs/setup/full-dev-environment",
                    "developer-docs/setup/frontend-dev-environment",
                    "developer-docs/setup/debugging",
                ],
            },
            {
                //#endregion

                //#region Writing documentation
                type: "category",
                label: "Writing documentation",
                link: {
                    type: "doc",
                    id: "developer-docs/docs/writing-documentation",
                },
                items: [
                    "developer-docs/docs/style-guide",
                    "developer-docs/docs/theming/index",
                    {
                        type: "category",
                        label: "Templates",
                        link: {
                            type: "doc",
                            id: "developer-docs/docs/templates/index",
                        },
                        items: [
                            "developer-docs/docs/templates/combo",
                            "developer-docs/docs/templates/procedural",
                            "developer-docs/docs/templates/conceptual",
                            "developer-docs/docs/templates/reference",
                        ],
                    },
                ],
            },
            {
                type: "doc",
                id: "developer-docs/releases/index",
            },
            "developer-docs/translation",
        ],
    },
    {
        //#endregion

        //#region Security
        type: "category",
        label: "Security",
        collapsed: true,
        link: {
            type: "generated-index",
            title: "Security",
            slug: "security",
        },
        items: [
            "security/policy",
            "security/security-hardening",
            {
                //#endregion

                //#region Audits and Certificates
                type: "category",
                label: "Audits and Certificates",
                items: [
                    "security/audits-and-certs/2023-06-cure53",
                    "security/audits-and-certs/2024-11-cobalt",
                    "security/audits-and-certs/2025-09-includesec",
                ],
            },
            {
                //#endregion

                //#region CVEs
                type: "category",
                label: "CVEs",
                items: [
                    {
                        type: "autogenerated",
                        dirName: "security/cves",
                    },
                ],
            },
        ],
    },
    {
        //#endregion

        //#region Troubleshooting
        type: "category",
        label: "Troubleshooting",
        link: {
            type: "generated-index",
            title: "Troubleshooting",
            slug: "troubleshooting",
            description: "Troubleshooting various issues",
        },
        items: [
            {
                //#endregion

                //#region Logs
                type: "category",
                label: "Logs",
                items: ["troubleshooting/logs/logs", "troubleshooting/logs/outpost_logs"],
            },
            {
                //#endregion

                //#region PostgreSQL
                type: "category",
                label: "PostgreSQL",
                items: [
                    "troubleshooting/postgres/upgrade_kubernetes",
                    "troubleshooting/postgres/upgrade_docker",
                ],
            },
            "troubleshooting/access",
            "troubleshooting/login",
            "troubleshooting/image_upload",
            "troubleshooting/missing_permission",
            "troubleshooting/missing_admin_group",
            "troubleshooting/csrf",
            "troubleshooting/emails",
            "troubleshooting/ldap_source",
            "troubleshooting/forward_auth",
        ],
    },
    {
        //#endregion

        //#region Release Notes
        type: "category",
        label: "Release Notes",
        link: {
            type: "generated-index",
            title: "Releases",
            slug: "releases",
            description: "Release Notes for recent authentik versions",
        },
        items: createReleaseSidebarEntries(releases),
    },
];

/**
 * @type {SidebarItemConfig}
 */
const sidebar = {
    docs: items,
};

export default sidebar;
