use rand::seq::IndexedRandom;

use crate::response_templates::{ACADEMIC_STYLES, CASUAL_STYLES, ENTERPRISE_STYLES};

/// The general tone of the template's text.
pub enum TemplateTone {
    Enterprise,
    Casual,
    Academic,
}

impl TemplateTone {
    pub fn random_link_title(&self) -> &'static str {
        match self {
            TemplateTone::Enterprise => ENTERPRISE_LINK_TITLES,
            TemplateTone::Casual => CASUAL_LINK_TITLES,
            TemplateTone::Academic => ACADEMIC_LINK_TITLES,
        }
        .choose(&mut rand::rng())
        .expect("the matching link titles list should not be empty")
    }

    pub fn random_style(&self) -> &'static str {
        match self {
            TemplateTone::Enterprise => ENTERPRISE_STYLES,
            TemplateTone::Casual => CASUAL_STYLES,
            TemplateTone::Academic => ACADEMIC_STYLES,
        }
        .choose(&mut rand::rng())
        .expect("the matching styles list should not be empty")
    }
}

const ENTERPRISE_LINK_TITLES: &[&str] = &[
    "Operational Improvements",
    "Engineering Initiatives",
    "Platform Enhancements",
    "System Updates",
    "Technical Highlights",
    "Infrastructure Improvements",
    "Ongoing Initiatives",
    "Strategic Programs",
    "Engineering Programs",
    "Optimization Efforts",
    "Reliability Initiatives",
    "Performance Improvements",
    "Efficiency Gains",
    "Cost Optimization",
    "Reliability Improvements",
    "Scalability Enhancements",
    "Technical Documentation",
    "Engineering Resources",
    "Reference Materials",
    "Design Documentation",
    "Implementation Guides",
    "Strategic Priorities",
    "Key Developments",
    "Organizational Improvements",
    "Operational Excellence",
    "Engineering Leadership Updates",
    "Additional Resources",
    "System Enhancements",
    "Platform Updates",
    "Engineering Updates",
    "Technical Initiatives",
    "Infrastructure Updates",
    "Service Improvements",
    "Core System Changes",
    "Platform Reliability",
    "System Optimization",
    "Operational Updates",
    "Engineering Overview",
    "Technical Overview",
    "System Overview",
    "Platform Overview",
    "Infrastructure Overview",
    "Engineering Insights",
    "Technical Insights",
    "System Insights",
    "Platform Insights",
    "Infrastructure Insights",
    "Engineering Analysis",
    "Technical Analysis",
    "System Analysis",
    "Platform Analysis",
    "Infrastructure Analysis",
    "Engineering Review",
    "Technical Review",
    "System Review",
    "Platform Review",
    "Infrastructure Review",
    "Engineering Summary",
    "Technical Summary",
    "System Summary",
    "Platform Summary",
    "Infrastructure Summary",
    "Engineering Updates Archive",
    "Technical Archive",
    "System Archive",
    "Platform Archive",
    "Infrastructure Archive",
    "Engineering Reports",
    "Technical Reports",
    "System Reports",
    "Platform Reports",
    "Infrastructure Reports",
    "Engineering Findings",
    "Technical Findings",
    "System Findings",
    "Platform Findings",
    "Infrastructure Findings",
    "Engineering Developments",
    "Technical Developments",
    "System Developments",
    "Platform Developments",
    "Infrastructure Developments",
    "Engineering Activities",
    "Technical Activities",
    "System Activities",
    "Platform Activities",
    "Infrastructure Activities",
    "Engineering Progress",
    "Technical Progress",
    "System Progress",
    "Platform Progress",
    "Infrastructure Progress",
    "Engineering Workstreams",
    "Technical Workstreams",
    "System Workstreams",
    "Platform Workstreams",
    "Infrastructure Workstreams",
];

const CASUAL_LINK_TITLES: &[&str] = &[
    "More Like This",
    "Keep Reading",
    "Continue Exploring",
    "More Posts",
    "Other Articles",
    "Related Reads",
    "You Might Also Like",
    "Worth a Read",
    "Further Reading",
    "More to Explore",
    "Other Things We've Built",
    "More from the Team",
    "Recent Writeups",
    "Latest Posts",
    "More Engineering Stories",
    "More Deep Dives",
    "More Writeups",
    "More Notes",
    "More Thoughts",
    "More Experiments",
    "Things We Learned",
    "Lessons Learned",
    "What We Found",
    "What We Discovered",
    "What Worked",
    "What Didn't",
    "More Learnings",
    "More Insights",
    "Key Takeaways",
    "More Takeaways",
    "More Case Studies",
    "Other Case Studies",
    "Similar Problems",
    "Related Fixes",
    "More Fixes",
    "Interesting Bugs",
    "Bug Stories",
    "Debugging Stories",
    "More Investigations",
    "More Breakdowns",
    "More Examples",
    "Other Examples",
    "More Implementations",
    "Code Examples",
    "More Code",
    "More Snippets",
    "More Patterns",
    "Other Patterns",
    "More Approaches",
    "Alternative Approaches",
    "More on This Topic",
    "Dig Deeper",
    "Go Deeper",
    "Explore the Details",
    "Learn More About This",
    "More on This",
    "More Details",
    "Full Breakdown",
    "Deep Dive Continued",
    "Extended Reading",
    "More Stories",
    "Other Stories",
    "More From This Series",
    "Next in the Series",
    "Previous Articles",
    "More Entries",
    "More Logs",
    "More Updates",
    "More Posts Like This",
    "More From This Blog",
    "Other Interesting Work",
    "More Interesting Work",
    "Other Things Worth Reading",
    "More Worth Reading",
    "Recommended Reads",
    "Staff Picks",
    "Editor's Picks",
    "Popular Reads",
    "Trending Articles",
    "Community Favorites",
    "More Experiments",
    "Other Experiments",
    "What We Tried",
    "More Things We Tried",
    "Experiments That Worked",
    "Experiments That Didn't",
    "More Trials",
    "More Iterations",
    "More Attempts",
    "More Prototypes",
    "More Engineering Notes",
    "Other Engineering Notes",
    "More System Notes",
    "More Dev Notes",
    "More Writeups Like This",
    "More Technical Notes",
    "More Dev Stories",
    "More Engineering Thoughts",
    "More Internal Notes",
    "More Build Logs",
];

const ACADEMIC_LINK_TITLES: &[&str] = &[
    "Further Reading",
    "Additional Reading",
    "Recommended Reading",
    "Suggested Reading",
    "Related Literature",
    "Relevant Literature",
    "Selected Works",
    "Additional Works",
    "Related Works",
    "Cited Works",
    "Primary Sources",
    "Secondary Sources",
    "Supporting Sources",
    "Reference List",
    "Bibliography",
    "Annotated Bibliography",
    "Selected References",
    "Further References",
    "Additional References",
    "Related References",
    "Related Research",
    "Relevant Research",
    "Prior Research",
    "Foundational Research",
    "Recent Research",
    "Contemporary Research",
    "Seminal Works",
    "Influential Works",
    "Key Works",
    "Core Works",
    "Related Studies",
    "Comparable Studies",
    "Prior Studies",
    "Empirical Studies",
    "Case Studies",
    "Experimental Studies",
    "Observational Studies",
    "Theoretical Studies",
    "Computational Studies",
    "Longitudinal Studies",
    "Methodological Notes",
    "Methods",
    "Research Methods",
    "Methodology",
    "Experimental Methods",
    "Analytical Methods",
    "Statistical Methods",
    "Theoretical Methods",
    "Computational Methods",
    "Modeling Approaches",
    "Supplementary Material",
    "Supplementary Materials",
    "Appendix",
    "Appendices",
    "Extended Appendix",
    "Technical Appendix",
    "Additional Material",
    "Supporting Material",
    "Online Appendix",
    "Data Appendix",
    "Related Publications",
    "Previous Publications",
    "Recent Publications",
    "Selected Publications",
    "Other Publications",
    "All Publications",
    "Author Publications",
    "Research Publications",
    "Journal Articles",
    "Conference Papers",
    "Related Papers",
    "Relevant Papers",
    "Prior Papers",
    "Seminal Papers",
    "Influential Papers",
    "Working Papers",
    "Discussion Papers",
    "Preprints",
    "Manuscripts",
    "Drafts",
    "Further Discussion",
    "Extended Discussion",
    "Discussion",
    "Critical Discussion",
    "Theoretical Discussion",
    "Empirical Discussion",
    "Comparative Discussion",
    "Methodological Discussion",
    "Literature Discussion",
    "Synthesis",
    "Related Concepts",
    "Background Concepts",
    "Foundational Concepts",
    "Theoretical Background",
    "Conceptual Background",
    "Frameworks",
    "Theoretical Frameworks",
    "Analytical Frameworks",
    "Model Frameworks",
    "Conceptual Frameworks",
    "Related Topics",
    "Adjacent Topics",
    "Core Topics",
    "Advanced Topics",
    "Introductory Topics",
    "Specialized Topics",
    "Topic Overview",
    "Topic Overview and Extensions",
    "Topic Extensions",
    "Further Topics",
];
