#pragma once

#include <tpee.h>
#include <orb.h>
#include "module/page.h"
#include "module/default.h"
#include "module/index.h"
#include "module/git_list.h"
#include "module/git_repo.h"
#include "module/git_repo_log.h"
#include "module/git_repo_tree.h"
#include "module/git_repo_refs.h"
#include "module/git_repo_commit.h"
#include "module/git_repo_blob.h"

typedef struct {
  const char* id;
  const orb_module_type_t *type;
} registry_entry_t;

static const registry_entry_t REGISTRY[] = {
  { "page", &PAGE_TYPE },
  { "default", &DEFAULT_TYPE },
  { "index", &INDEX_TYPE },
  { "git_list", &GIT_LIST_TYPE },
  { "git_repo", &GIT_REPO_TYPE },
  { "git_repo_log", &GIT_REPO_LOG_TYPE },
  { "git_repo_tree", &GIT_REPO_TREE_TYPE },
  { "git_repo_refs", &GIT_REPO_REFS_TYPE },
  { "git_repo_commit", &GIT_REPO_COMMIT_TYPE },
  { "git_repo_blob", &GIT_REPO_BLOB_TYPE },
};

static const size_t REGISTRY_LEN = sizeof(REGISTRY) / sizeof(REGISTRY[0]);
