//! Domain logic for {{module_name}}

use anyhow::Result;

/// Execute {{module_name}} business logic
pub async fn execute(args: crate::cmds::{{snake_case module_name}}::{{pascal_case module_name}}Args) -> Result<()> {
    println!("Executing {{module_name}}");

    {{#each arguments}}
    println!("  {{this.name}}: {:?}", args.{{this.name}});
    {{/each}}

    {{#each flags}}
    if args.{{this.name}} {
        println!("  Flag {{this.name}} is enabled");
    }
    {{/each}}

    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

    #[tokio::test]
    async fn test_{{snake_case module_name}}_execute() {
        // TODO: Add tests
    }
}
