/**
 * Copyright (c) 2017-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

module.exports = {
  Addons: [
    "add-ons",
    "add-ons/tutorial",
    "add-ons/configuration",
    "add-ons/communication",
    "add-ons/testing",
    "add-ons/publishing",
    "add-ons/presentation",
    "add-ons/repository",
    "add-ons/security",
  ],
  API: [
    "api/rest",
    "api/websocket",
    {
      type: "category",
      label: "Supervisor API",
      items: [
        "api/supervisor/endpoints",
        "api/supervisor/models",
        "api/supervisor/examples",
      ],
    },
    {
      type: "category",
      label: "Native App Integration",
      items: [
        "api/native-app-integration",
        "api/native-app-integration/setup",
        "api/native-app-integration/sending-data",
        "api/native-app-integration/sensors",
        "api/native-app-integration/notifications",
        "api/native-app-integration/webview",
      ],
    },
  ],
  Documenting: [
    "documenting",
    "documenting/standards",
    "documenting/yaml-style-guide",
    "documenting/create-page",
  ],
  Frontend: [
    "frontend",
    "frontend/architecture",
    "frontend/development",
    "frontend/data",
    "frontend/external-authentication",
    "frontend/external-bus",
    {
      type: "category",
      label: "Extending the frontend",
      items: [
        "frontend/extending/adding-state-card",
        "frontend/extending/adding-more-info-dialogs",
        "frontend/extending/websocket-api",
      ],
    },
    {
      type: "category",
      label: "Custom UI",
      items: [
        "frontend/custom-ui/custom-card",
        "frontend/custom-ui/custom-strategy",
        "frontend/custom-ui/custom-view",
        "frontend/custom-ui/creating-custom-panels",
        "frontend/custom-ui/registering-resources",
      ],
    },
  ],
  Internationalization: [
    "translations",
    "internationalization",
    "internationalization/core",
    "internationalization/custom_integration",
  ],
  OperatingSystem: [
    "operating-system",
    "operating-system/getting-started",
    "operating-system/debugging",
    "operating-system/partition",
    "operating-system/board-metadata",
    "operating-system/deployment"
  ],
  Supervisor: ["supervisor", "supervisor/development", "supervisor/debugging"],
  // Old structure, still to move/migrate
  Architecture: {
    Architecture: [
      "architecture_index",
      "architecture/core",
      "architecture_components",
    ],
    Authentication: [
      "auth_index",
      "auth_permissions",
      "auth_api",
      "auth_auth_provider",
      "auth_auth_module",
    ],
    Configuration: ["config_entries_index", "data_entry_flow_index"],
    "Integrating devices & services": [
      "architecture/devices-and-services",
      "entity_registry_index",
      "entity_registry_disabled_by",
      "device_registry_index",
      "area_registry_index",
    ],
  },
  Core: {
    "Development Workflow": [
      "development_index",
      "development_environment",
      "development_submitting",
      "development_guidelines",
      "development_testing",
      "development_catching_up",
      "development_tips"
    ],
    "Building Integrations": [
      "creating_component_index",
      "creating_integration_file_structure",
      "creating_integration_brand",
      "creating_integration_manifest",
      "config_entries_config_flow_handler",
      "config_entries_options_flow_handler",
      "configuration_yaml_index",
      "dev_101_services",
      "creating_platform_index",
      "creating_component_generic_discovery",
      "integration_fetching_data",
      "integration_setup_failures",
      "integration_events",
      "integration_listen_events",
      "network_discovery",
      "bluetooth",
    ],
    "Development Checklist": [
      "development_checklist",
      "creating_component_code_review",
      "creating_platform_code_review",
      "integration_quality_scale_index",
    ],
    "Accessing the Core": [
      "dev_101_hass",
      "dev_101_events",
      "dev_101_states",
      "dev_101_config",
    ],
    Entities: [
      "core/entity",
      {
        type: 'autogenerated',
        dirName: 'core/entity',
      },
    ],
    Platforms: [
      {
        type: 'autogenerated',
        dirName: 'core/platform',
      },
    ],
    Registries: [
      "area_registry_index",
      "device_registry_index",
      "entity_registry_index",
      "entity_registry_disabled_by",
      "issue_registry_index",
    ],
    "Device Automations": [
      "device_automation_index",
      "device_automation_trigger",
      "device_automation_condition",
      "device_automation_action",
    ],
    Misc: ["development_validation", "development_typing", "instance_url"],
  },
  Misc: {
    Introduction: ["misc"],
    Intents: [
      "intent_index",
      "intent_firing",
      "intent_handling",
      "intent_conversation",
      "intent_builtin",
      "intent_conversation_api",
    ],
    "Building a Python library": [
      "api_lib_index",
      "api_lib_auth",
      "api_lib_data_models",
    ],
    asyncio: [
      "asyncio_index",
      "asyncio_101",
      "asyncio_categorizing_functions",
      "asyncio_working_with_async",
    ],
    "Maintainer docs": ["maintenance"],
  },
};
