use std::env;
use std::fs;
use std::path::Path;
fn main() {
println!("cargo:rerun-if-changed=themes");
let out_dir = env::var("OUT_DIR").unwrap();
let dest_path = Path::new(&out_dir).join("themes.rs");
let themes_content = r##"
// Auto-generated theme data
// This file is generated by build.rs
use phf::{Map, phf_map};
pub static BUILTIN_THEMES: Map<&'static str, &'static str> = phf_map! {
"default" => r#"
name = "default"
description = "Default built-in theme"
term_bg_luma = "dark"
min_color_support = "basic"
backgrounds = []
[palette]
heading1 = "#0000FF"
heading2 = "#00FFFF"
heading3 = "#00FF00"
error = "#FF0000"
warning = "#FFFF00"
success = "#00FF00"
info = "#00FFFF"
emphasis = "#FF00FF"
code = "#FFFF80"
normal = "#FFFFFF"
subtle = "#808080"
hint = "#80FFFF"
debug = "#C0C0C0"
link = "#FF8080"
quote = "#C0C0FF"
commentary = "#A0A0A0"
"#,
};
"##;
fs::write(&dest_path, themes_content).unwrap();
}