import { userPage } from "./user";
import { viewLinkedAccountsPage } from "./artist/linked_accounts.js";
import { newLinkedAccountPage } from "./artist/new_linked_account.js";
import { changePasswordPage, registerPage } from "./account/_index.js";
import { postPage } from "./post";
import { importerPage } from "./importer_list";
import { importerStatusPage } from "./importer_status";
import { postsPage } from "./posts";
import { artistsPage } from "./artists";
import { updatedPage } from "./updated";
import { uploadPage } from "./upload";
import { searchHashPage } from "./search_hash";
import { registerPaginatorKeybinds } from "@wp/components";
import { reviewDMsPage } from "./review_dms/dms";
import { creatorLinksPage } from "./account/moderator/creator_links";

export { adminPageScripts } from "./account/administrator/_index.js";
export { moderatorPageScripts } from "./account/moderator/_index.js";
/**
 * The map of page names and their callbacks.
 */
export const globalPageScripts = new Map([
  ["user", [userPage]],
  ["register", [registerPage]],
  ["change-password", [changePasswordPage]],
  ["linked-account", [viewLinkedAccountsPage]],
  ["new-linked-account", [newLinkedAccountPage]],
  ["post", [postPage]],
  ["importer", [importerPage]],
  ["importer-status", [importerStatusPage]],
  ["posts", [postsPage]],
  ["popular-posts", [postsPage]],
  ["artists", [artistsPage]],
  ["updated", [updatedPage]],
  ["upload", [uploadPage]],
  ["all-dms", [registerPaginatorKeybinds]],
  ["favorites", [registerPaginatorKeybinds]],
  ["file-hash-search", [searchHashPage]],
  ["review-dms", [reviewDMsPage]],
  // trying to load moderator scripts by initSections(moderatorPageScripts) breaks this pile of junk
  // so it's going here instead
  ["moderator-creator-links", [creatorLinksPage]],
]);
