use crate::Testament;
use crate::book::{Book, Ordering};

pub static MATTHEW: Book = Book {
    title: "Matthew",
    testament: Testament::New,
    aliases: &[
        "The Gospel According to Matthew",
        "Gospel of Matthew",
        "The Gospel of Matthew",
        "Gospel According to Matthew",
        "The Gospel According to St. Matthew",
    ],
    abbreviations: &[
        "Matt", "Mt", // USFM/Paratext
        "MAT",
    ],
    sort_order: Ordering {
        english: 40,
        septuagint: -1,
        vulgate: 40,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 25, 23, 17, 25, 48, 34, 29, 34, 38, 42, 30, 50, 58, 36, 39, 28, 27, 35, 30, 34, 46, 46,
        39, 51, 46, 75, 66, 20,
    ],
};

pub static MARK: Book = Book {
    title: "Mark",
    testament: Testament::New,
    aliases: &[
        "The Gospel According to Mark",
        "Gospel of Mark",
        "The Gospel of Mark",
        "Gospel According to Mark",
        "The Gospel According to St. Mark",
    ],
    abbreviations: &[
        "Mrk", "Mk", // Additional common forms
        "Mar", "Mr", // USFM/Paratext
        "MRK",
    ],
    sort_order: Ordering {
        english: 41,
        septuagint: -1,
        vulgate: 41,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 45, 28, 35, 41, 43, 56, 37, 38, 50, 52, 33, 44, 37, 72, 47, 20,
    ],
};

pub static LUKE: Book = Book {
    title: "Luke",
    testament: Testament::New,
    aliases: &[
        "The Gospel According to Luke",
        "Gospel of Luke",
        "The Gospel of Luke",
        "Gospel According to Luke",
        "The Gospel According to St. Luke",
    ],
    abbreviations: &[
        "Luk", "Lk", // USFM/Paratext
        "LUK",
    ],
    sort_order: Ordering {
        english: 42,
        septuagint: -1,
        vulgate: 42,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 80, 52, 38, 44, 39, 49, 50, 56, 62, 42, 54, 59, 35, 35, 32, 31, 37, 43, 48, 47, 38, 71,
        56, 53,
    ],
};

pub static JOHN: Book = Book {
    title: "John",
    testament: Testament::New,
    aliases: &[
        "The Gospel According to John",
        "Gospel of John",
        "The Gospel of John",
        "Gospel According to John",
        "The Gospel According to St. John",
    ],
    abbreviations: &[
        "Jhn", "Jn",  // Additional common forms
        "Joh", // USFM/Paratext
        "JHN",
    ],
    sort_order: Ordering {
        english: 43,
        septuagint: -1,
        vulgate: 43,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 51, 25, 36, 54, 47, 71, 53, 59, 41, 42, 57, 50, 38, 31, 27, 33, 26, 40, 42, 31, 25,
    ],
};

pub static ACTS: Book = Book {
    title: "Acts",
    testament: Testament::New,
    aliases: &[
        "The Acts of the Apostles",
        "Acts of the Apostles",
        "The Book of Acts",
        "Book of Acts",
    ],
    abbreviations: &[
        "Acts", "Ac",  // Additional common forms
        "Act", // USFM/Paratext
        "ACT",
    ],
    sort_order: Ordering {
        english: 44,
        septuagint: -1,
        vulgate: 44,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 26, 47, 26, 37, 42, 15, 60, 40, 43, 48, 30, 25, 52, 28, 41, 40, 34, 28, 40, 38, 40, 30,
        35, 27, 27, 32, 44, 31,
    ],
};

pub static ROMANS: Book = Book {
    title: "Romans",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to the Romans",
        "Epistle to the Romans",
        "The Letter of Paul to the Romans",
        "Letter to the Romans",
    ],
    abbreviations: &[
        "Rom", "Ro", "Rm", // USFM/Paratext
        "ROM",
    ],
    sort_order: Ordering {
        english: 45,
        septuagint: -1,
        vulgate: 45,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 32, 29, 31, 25, 21, 23, 25, 39, 33, 21, 36, 21, 14, 23, 33, 27,
    ],
};

pub static FIRST_CORINTHIANS: Book = Book {
    title: "1 Corinthians",
    testament: Testament::New,
    aliases: &[
        "The First Epistle of Paul to the Corinthians",
        "First Epistle to the Corinthians",
        "First Corinthians",
        "I Corinthians",
        "1st Corinthians",
        "The First Letter of Paul to the Corinthians",
    ],
    abbreviations: &[
        "1 Cor",
        "1Cor",
        "1 Co",
        "1Co",
        "I Cor",
        // Additional common forms
        "1Corinthians",
        "I Co",
        "1st Cor",
        "First Cor",
        // USFM/Paratext
        "1CO",
    ],
    sort_order: Ordering {
        english: 46,
        septuagint: -1,
        vulgate: 46,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 31, 16, 23, 21, 13, 20, 40, 13, 27, 33, 34, 31, 13, 40, 58, 24,
    ],
};

pub static SECOND_CORINTHIANS: Book = Book {
    title: "2 Corinthians",
    testament: Testament::New,
    aliases: &[
        "The Second Epistle of Paul to the Corinthians",
        "Second Epistle to the Corinthians",
        "Second Corinthians",
        "II Corinthians",
        "2nd Corinthians",
        "The Second Letter of Paul to the Corinthians",
    ],
    abbreviations: &[
        "2 Cor",
        "2Cor",
        "2 Co",
        "2Co",
        "II Cor",
        // Additional common forms
        "2Corinthians",
        "II Co",
        "2nd Cor",
        "Second Cor",
        // USFM/Paratext
        "2CO",
    ],
    sort_order: Ordering {
        english: 47,
        septuagint: -1,
        vulgate: 47,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 24, 17, 18, 18, 21, 18, 16, 24, 15, 18, 33, 21, 13],
};

pub static GALATIANS: Book = Book {
    title: "Galatians",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to the Galatians",
        "Epistle to the Galatians",
        "The Letter of Paul to the Galatians",
        "Letter to the Galatians",
    ],
    abbreviations: &[
        "Gal", "Ga", // USFM/Paratext
        "GAL",
    ],
    sort_order: Ordering {
        english: 48,
        septuagint: -1,
        vulgate: 48,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 24, 21, 29, 31, 26, 18],
};

pub static EPHESIANS: Book = Book {
    title: "Ephesians",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to the Ephesians",
        "Epistle to the Ephesians",
        "The Letter of Paul to the Ephesians",
        "Letter to the Ephesians",
    ],
    abbreviations: &[
        "Eph", "Ep",    // Additional forms
        "Ephes", // USFM/Paratext
        "EPH",
    ],
    sort_order: Ordering {
        english: 49,
        septuagint: -1,
        vulgate: 49,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 23, 22, 21, 32, 33, 24],
};

pub static PHILIPPIANS: Book = Book {
    title: "Philippians",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to the Philippians",
        "Epistle to the Philippians",
        "The Letter of Paul to the Philippians",
        "Letter to the Philippians",
    ],
    abbreviations: &[
        "Phil", "Php", "Pp", // USFM/Paratext
        "PHP",
    ],
    sort_order: Ordering {
        english: 50,
        septuagint: -1,
        vulgate: 50,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 30, 30, 21, 23],
};

pub static COLOSSIANS: Book = Book {
    title: "Colossians",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to the Colossians",
        "Epistle to the Colossians",
        "The Letter of Paul to the Colossians",
        "Letter to the Colossians",
    ],
    abbreviations: &[
        "Col", "Co", // USFM/Paratext
        "COL",
    ],
    sort_order: Ordering {
        english: 51,
        septuagint: -1,
        vulgate: 51,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 29, 23, 25, 18],
};

pub static FIRST_THESSALONIANS: Book = Book {
    title: "1 Thessalonians",
    testament: Testament::New,
    aliases: &[
        "The First Epistle of Paul to the Thessalonians",
        "First Epistle to the Thessalonians",
        "First Thessalonians",
        "I Thessalonians",
        "1st Thessalonians",
        "The First Letter of Paul to the Thessalonians",
    ],
    abbreviations: &[
        "1 Thess",
        "1Thess",
        "1 Th",
        "1Th",
        "I Thess",
        // Additional common forms
        "1Thes",
        "1 Thes",
        "I Thes",
        "I Th",
        "1Thessalonians",
        "1st Thess",
        "First Thess",
        // USFM/Paratext
        "1TH",
    ],
    sort_order: Ordering {
        english: 52,
        septuagint: -1,
        vulgate: 52,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 10, 20, 13, 18, 28],
};

pub static SECOND_THESSALONIANS: Book = Book {
    title: "2 Thessalonians",
    testament: Testament::New,
    aliases: &[
        "The Second Epistle of Paul to the Thessalonians",
        "Second Epistle to the Thessalonians",
        "Second Thessalonians",
        "II Thessalonians",
        "2nd Thessalonians",
        "The Second Letter of Paul to the Thessalonians",
    ],
    abbreviations: &[
        "2 Thess",
        "2Thess",
        "2 Th",
        "2Th",
        "II Thess",
        // Additional common forms
        "2Thes",
        "2 Thes",
        "II Thes",
        "II Th",
        "2Thessalonians",
        "2nd Thess",
        "Second Thess",
        // USFM/Paratext
        "2TH",
    ],
    sort_order: Ordering {
        english: 53,
        septuagint: -1,
        vulgate: 53,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 12, 17, 18],
};

pub static FIRST_TIMOTHY: Book = Book {
    title: "1 Timothy",
    testament: Testament::New,
    aliases: &[
        "The First Epistle of Paul to Timothy",
        "First Epistle to Timothy",
        "First Timothy",
        "I Timothy",
        "1st Timothy",
        "The First Letter of Paul to Timothy",
    ],
    abbreviations: &[
        "1 Tim",
        "1Tim",
        "1 Ti",
        "1Ti",
        "I Tim",
        // Additional common forms
        "1Timothy",
        "I Ti",
        "1st Tim",
        "First Tim",
        // USFM/Paratext
        "1TI",
    ],
    sort_order: Ordering {
        english: 54,
        septuagint: -1,
        vulgate: 54,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 20, 15, 16, 16, 25, 21],
};

pub static SECOND_TIMOTHY: Book = Book {
    title: "2 Timothy",
    testament: Testament::New,
    aliases: &[
        "The Second Epistle of Paul to Timothy",
        "Second Epistle to Timothy",
        "Second Timothy",
        "II Timothy",
        "2nd Timothy",
        "The Second Letter of Paul to Timothy",
    ],
    abbreviations: &[
        "2 Tim",
        "2Tim",
        "2 Ti",
        "2Ti",
        "II Tim",
        // Additional common forms
        "2Timothy",
        "II Ti",
        "2nd Tim",
        "Second Tim",
        // USFM/Paratext
        "2TI",
    ],
    sort_order: Ordering {
        english: 55,
        septuagint: -1,
        vulgate: 55,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 18, 26, 17, 22],
};

pub static TITUS: Book = Book {
    title: "Titus",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to Titus",
        "Epistle to Titus",
        "The Letter of Paul to Titus",
        "Letter to Titus",
    ],
    abbreviations: &[
        "Tit", "Ti", // USFM/Paratext
        "TIT",
    ],
    sort_order: Ordering {
        english: 56,
        septuagint: -1,
        vulgate: 56,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 16, 15, 15],
};

pub static PHILEMON: Book = Book {
    title: "Philemon",
    testament: Testament::New,
    aliases: &[
        "The Epistle of Paul to Philemon",
        "Epistle to Philemon",
        "The Letter of Paul to Philemon",
        "Letter to Philemon",
    ],
    abbreviations: &[
        "Philem", "Phm", "Pm", "Phlm",  // Additional forms
        "Phile", // USFM/Paratext
        "PHM",
    ],
    sort_order: Ordering {
        english: 57,
        septuagint: -1,
        vulgate: 57,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 25],
};

pub static HEBREWS: Book = Book {
    title: "Hebrews",
    testament: Testament::New,
    aliases: &[
        "The Epistle to the Hebrews",
        "Epistle to the Hebrews",
        "The Letter to the Hebrews",
        "Letter to the Hebrews",
    ],
    abbreviations: &[
        "Heb", "He", // USFM/Paratext
        "HEB",
    ],
    sort_order: Ordering {
        english: 58,
        septuagint: -1,
        vulgate: 58,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 14, 18, 19, 16, 14, 20, 28, 13, 28, 39, 40, 29, 25],
};

pub static JAMES: Book = Book {
    title: "James",
    testament: Testament::New,
    aliases: &[
        "The General Epistle of James",
        "The Epistle of James",
        "Epistle of James",
        "The Letter of James",
        "Letter of James",
    ],
    abbreviations: &[
        "Jas", "Jam", "Jm", // USFM/Paratext
        "JAS",
    ],
    sort_order: Ordering {
        english: 59,
        septuagint: -1,
        vulgate: 59,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 27, 26, 18, 17, 20],
};

pub static FIRST_PETER: Book = Book {
    title: "1 Peter",
    testament: Testament::New,
    aliases: &[
        "The First Epistle General of Peter",
        "The First Epistle of Peter",
        "First Epistle of Peter",
        "First Peter",
        "I Peter",
        "1st Peter",
        "The First Letter of Peter",
    ],
    abbreviations: &[
        "1 Pet",
        "1Pet",
        "1 Pe",
        "1Pe",
        "I Pet",
        // Additional common forms
        "1Peter",
        "I Pe",
        "1 Pt",
        "1Pt",
        "I Pt",
        "1 P",
        "1P",
        "1st Pet",
        "First Pet",
        // USFM/Paratext
        "1PE",
    ],
    sort_order: Ordering {
        english: 60,
        septuagint: -1,
        vulgate: 60,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 25, 25, 22, 19, 14],
};

pub static SECOND_PETER: Book = Book {
    title: "2 Peter",
    testament: Testament::New,
    aliases: &[
        "The Second Epistle General of Peter",
        "The Second Epistle of Peter",
        "Second Epistle of Peter",
        "Second Peter",
        "II Peter",
        "2nd Peter",
        "The Second Letter of Peter",
    ],
    abbreviations: &[
        "2 Pet",
        "2Pet",
        "2 Pe",
        "2Pe",
        "II Pet",
        // Additional common forms
        "2Peter",
        "II Pe",
        "2 Pt",
        "2Pt",
        "II Pt",
        "2 P",
        "2P",
        "2nd Pet",
        "Second Pet",
        // USFM/Paratext
        "2PE",
    ],
    sort_order: Ordering {
        english: 61,
        septuagint: -1,
        vulgate: 61,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 21, 22, 18],
};

pub static FIRST_JOHN: Book = Book {
    title: "1 John",
    testament: Testament::New,
    aliases: &[
        "The First Epistle General of John",
        "The First Epistle of John",
        "First Epistle of John",
        "First John",
        "I John",
        "1st John",
        "The First Letter of John",
    ],
    abbreviations: &[
        "1 John",
        "1Jn",
        "1 Jn",
        "1 Jo",
        "1Jo",
        "I Jn",
        // Additional common forms
        "1John",
        "1Joh",
        "I Joh",
        "I Jo",
        "1 Jhn",
        "1Jhn",
        "I Jhn",
        "1 J",
        "1J",
        "1st John",
        "First John",
        // USFM/Paratext
        "1JN",
    ],
    sort_order: Ordering {
        english: 62,
        septuagint: -1,
        vulgate: 62,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 10, 29, 24, 21, 21],
};

pub static SECOND_JOHN: Book = Book {
    title: "2 John",
    testament: Testament::New,
    aliases: &[
        "The Second Epistle General of John",
        "The Second Epistle of John",
        "Second Epistle of John",
        "Second John",
        "II John",
        "2nd John",
        "The Second Letter of John",
    ],
    abbreviations: &[
        "2 John",
        "2Jn",
        "2 Jn",
        "2 Jo",
        "2Jo",
        "II Jn",
        // Additional common forms
        "2John",
        "2Joh",
        "II Joh",
        "II Jo",
        "2 Jhn",
        "2Jhn",
        "II Jhn",
        "2 J",
        "2J",
        "2nd John",
        "Second John",
        // USFM/Paratext
        "2JN",
    ],
    sort_order: Ordering {
        english: 63,
        septuagint: -1,
        vulgate: 63,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 13],
};

pub static THIRD_JOHN: Book = Book {
    title: "3 John",
    testament: Testament::New,
    aliases: &[
        "The Third Epistle General of John",
        "The Third Epistle of John",
        "Third Epistle of John",
        "Third John",
        "III John",
        "3rd John",
        "The Third Letter of John",
    ],
    abbreviations: &[
        "3 John",
        "3Jn",
        "3 Jn",
        "3 Jo",
        "3Jo",
        "III Jn",
        // Additional common forms
        "3John",
        "3Joh",
        "III Joh",
        "III Jo",
        "3 Jhn",
        "3Jhn",
        "III Jhn",
        "3 J",
        "3J",
        "3rd John",
        "Third John",
        // USFM/Paratext
        "3JN",
    ],
    sort_order: Ordering {
        english: 64,
        septuagint: -1,
        vulgate: 64,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 15],
};

pub static JUDE: Book = Book {
    title: "Jude",
    testament: Testament::New,
    aliases: &[
        "The General Epistle of Jude",
        "The Epistle of Jude",
        "Epistle of Jude",
        "The Letter of Jude",
        "Letter of Jude",
    ],
    abbreviations: &[
        "Jude", "Jud", "Jd", // USFM/Paratext
        "JUD",
    ],
    sort_order: Ordering {
        english: 65,
        septuagint: -1,
        vulgate: 65,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[0, 25],
};

pub static REVELATION: Book = Book {
    title: "Revelation",
    testament: Testament::New,
    aliases: &[
        "The Revelation of St. John the Divine",
        "Apocalypse of John",
        "The Revelation to John",
        "The Book of Revelation",
        "Book of Revelation",
        "The Revelation of Jesus Christ",
        // Common alternate title
        "Apocalypse",
    ],
    abbreviations: &[
        "Rev", "Re", "Rv",   // Additional forms
        "Apoc", // USFM/Paratext
        "REV",
    ],
    sort_order: Ordering {
        english: 66,
        septuagint: -1,
        vulgate: 66,
        lenningrad: -1,
        bhs: -1,
        snaith: -1,
        talmud: -1,
        vaticanus: -1,
        sinaiticus: -1,
        alexandrinus: -1,
    },
    layout: &[
        0, 20, 29, 22, 11, 14, 17, 17, 13, 21, 11, 19, 18, 18, 20, 8, 21, 18, 24, 21, 15, 27, 21,
    ],
};
