//! Embeds the documentation files the drift tests guard. Module root for the
//! `docs_files` anonymous import (test builds only) — @embedFile paths resolve
//! relative to this file.

pub const reference_api_md = @embedFile("reference/api.md");
pub const reference_configuration_md = @embedFile("reference/configuration.md");
pub const reference_cli_md = @embedFile("reference/cli.md");

pub const tutorial_first_run_md = @embedFile("tutorial/first-run.md");

pub const howto_back_up_and_restore_md = @embedFile("how-to/back-up-and-restore.md");
pub const howto_enable_doh_and_dot_md = @embedFile("how-to/enable-doh-and-dot.md");
pub const howto_install_with_docker_md = @embedFile("how-to/install-with-docker.md");
pub const howto_install_with_systemd_md = @embedFile("how-to/install-with-systemd.md");
pub const howto_measure_performance_md = @embedFile("how-to/measure-performance.md");
pub const howto_set_up_admin_authentication_md = @embedFile("how-to/set-up-admin-authentication.md");
pub const howto_troubleshoot_md = @embedFile("how-to/troubleshoot.md");
pub const howto_upgrade_md = @embedFile("how-to/upgrade.md");
pub const howto_verify_a_release_md = @embedFile("how-to/verify-a-release.md");

pub const Page = struct {
    /// Repo-relative path, so a failing assertion names the file to edit.
    path: []const u8,
    text: []const u8,
};

/// Every page this module embeds. A guard that must hold for all of them walks
/// this table instead of naming each decl.
pub const pages: []const Page = &.{
    .{ .path = "docs/reference/api.md", .text = reference_api_md },
    .{ .path = "docs/reference/configuration.md", .text = reference_configuration_md },
    .{ .path = "docs/reference/cli.md", .text = reference_cli_md },
    .{ .path = "docs/tutorial/first-run.md", .text = tutorial_first_run_md },
    .{ .path = "docs/how-to/back-up-and-restore.md", .text = howto_back_up_and_restore_md },
    .{ .path = "docs/how-to/enable-doh-and-dot.md", .text = howto_enable_doh_and_dot_md },
    .{ .path = "docs/how-to/install-with-docker.md", .text = howto_install_with_docker_md },
    .{ .path = "docs/how-to/install-with-systemd.md", .text = howto_install_with_systemd_md },
    .{ .path = "docs/how-to/measure-performance.md", .text = howto_measure_performance_md },
    .{ .path = "docs/how-to/set-up-admin-authentication.md", .text = howto_set_up_admin_authentication_md },
    .{ .path = "docs/how-to/troubleshoot.md", .text = howto_troubleshoot_md },
    .{ .path = "docs/how-to/upgrade.md", .text = howto_upgrade_md },
    .{ .path = "docs/how-to/verify-a-release.md", .text = howto_verify_a_release_md },
};

/// The pages that paste a transcript naming the running binary's version. Each
/// one must print the `<version>` placeholder rather than the version of the
/// day the page was written.
pub const version_transcript_pages: []const Page = &.{
    .{ .path = "docs/tutorial/first-run.md", .text = tutorial_first_run_md },
    .{ .path = "docs/how-to/install-with-docker.md", .text = howto_install_with_docker_md },
    .{ .path = "docs/how-to/install-with-systemd.md", .text = howto_install_with_systemd_md },
    .{ .path = "docs/how-to/upgrade.md", .text = howto_upgrade_md },
};
