use std::path::{Path, PathBuf};
use wry::{
http::{status::StatusCode, Request, Response},
Result,
};
const MODULE_LOADER: &str = r#"
"#;
pub(super) fn desktop_handler(
request: &Request>,
asset_root: Option,
custom_head: Option,
custom_index: Option,
) -> Result>> {
// Any content that uses the `dioxus://` scheme will be shuttled through this handler as a "special case".
// For now, we only serve two pieces of content which get included as bytes into the final binary.
let path = request.uri().to_string().replace("dioxus://", "");
// all assets should be called from index.html
let trimmed = path.trim_start_matches("index.html/");
if trimmed.is_empty() {
// If a custom index is provided, just defer to that, expecting the user to know what they're doing.
// we'll look for the closing