#![allow(non_camel_case_types, non_snake_case, dead_code, unused_imports)]

// All Rights Reserved — The Cochran Block, LLC
// Contributors: Mattbusel (XFactor), GotEmCoach, KOVA, Claude Opus 4.6, SuperNinja, Composer 1.5, Google Gemini Pro 3

use axum::extract::Path;
use axum::http::StatusCode;
use axum::response::IntoResponse;
use include_packed::include_packed;

/// f23 = serve_static — include_packed assets (zstd)
fn t15_get(p0: &str) -> Option<Vec<u8>> {
    let v0 = match p0 {
        "css/main.css" => include_packed!("assets/css/main.css"),
        "js/booking.js" => include_packed!("assets/js/booking.js"),
        "js/calendar.js" => include_packed!("assets/js/calendar.js"),
        "js/main.js" => include_packed!("assets/js/main.js"),
        "js/sw.js" => include_packed!("assets/js/sw.js"),
        "favicon.svg" => include_packed!("assets/favicon.svg"),
        "cochranblock-logo.svg" => include_packed!("assets/cochranblock-logo.svg"),
        "cochranblock-hero-logo.svg" => include_packed!("assets/cochranblock-hero-logo.svg"),
        "img/kova.png" => include_packed!("assets/img/kova.png"),
        "img/rogue-repo.png" => include_packed!("assets/img/rogue-repo.png"),
        "img/ronin-sites.png" => include_packed!("assets/img/ronin-sites.png"),
        "img/pixel-forge.png" => include_packed!("assets/img/pixel-forge.png"),
        "img/aptnomo.png" => include_packed!("assets/img/aptnomo.png"),
        // Primary descriptive filenames — these are what land in the user's
        // Downloads folder when a contracting officer or recruiter saves them.
        "michael-cochran-resume_may_2026.pdf" => {
            include_packed!("assets/michael-cochran-resume_may_2026.pdf")
        }
        "cochranblock-capability-statement.pdf" => {
            include_packed!("assets/cochranblock-capability-statement.pdf")
        }
        // Legacy bare names — keep serving the same bytes so external links and
        // search-engine indexes don't 404. Internal links use the new names.
        "resume.pdf" => include_packed!("assets/michael-cochran-resume_may_2026.pdf"),
        "capability-statement.pdf" => {
            include_packed!("assets/cochranblock-capability-statement.pdf")
        }
        "og-image.png" => include_packed!("assets/og-image.png"),
        "icon-192.png" => include_packed!("assets/icon-192.png"),
        "icon-512.png" => include_packed!("assets/icon-512.png"),
        "apple-touch-icon.png" => include_packed!("assets/apple-touch-icon.png"),
        "manifest.json" => include_packed!("assets/manifest.json"),
        _ => return None,
    };
    Some(v0)
}

pub async fn f23(Path(p1): Path<String>) -> impl IntoResponse {
    let v0 = p1.trim_start_matches('/');
    match t15_get(v0) {
        Some(v1) => {
            let v2 = mime_guess::from_path(v0).first_or_octet_stream();
            ([(axum::http::header::CONTENT_TYPE, v2.as_ref())], v1).into_response()
        }
        None => StatusCode::NOT_FOUND.into_response(),
    }
}
