use clap::{Arg, App, SubCommand};
use wallet_system::basic_wallet::BasicWallet;
use wallet_system::multi_currency_wallet::MultiCurrencyWallet;
fn main() {
let matches = App::new("Wallet CLI")
.version("1.0")
.author("kanth")
.about("Manages wallets and accounts")
.subcommand(
SubCommand::with_name("create_wallet")
.about("Creates a new wallet")
.arg(Arg::with_name("type")
.help("The type of wallet to create (basic or multi)")
.required(true)
.index(1)),
)
.subcommand(
SubCommand::with_name("create_account")
.about("Creates a new account in a wallet")
.arg(Arg::with_name("wallet_id")
.help("The ID of the wallet")
.required(true)
.index(1))
.arg(Arg::with_name("type")
.help("The type of account to create (basic or premium)")
.required(true)
.index(2))
.arg(Arg::with_name("currency")
.help("The currency of the account")
.required(true)
.index(3))
.arg(Arg::with_name("overdraft")
.help("The overdraft limit for premium accounts")
.required(false)
.index(4)),
)
.subcommand(
SubCommand::with_name("deposit")
.about("Deposits money into an account")
.arg(Arg::with_name("wallet_id")
.help("The ID of the wallet")
.required(true)
.index(1))
.arg(Arg::with_name("amount")
.help("The amount to deposit")
.required(true)
.index(2))
.arg(Arg::with_name("currency")
.help("The currency of the account")
.required(true)
.index(3)),
)
.subcommand(
SubCommand::with_name("withdraw")
.about("Withdraws money from an account")
.arg(Arg::with_name("wallet_id")
.help("The ID of the wallet")
.required(true)
.index(1))
.arg(Arg::with_name("amount")
.help("The amount to withdraw")
.required(true)
.index(2))
.arg(Arg::with_name("currency")
.help("The currency of the account")
.required(true)
.index(3)),
)
.subcommand(
SubCommand::with_name("transfer")
.about("Transfers money between accounts")
.arg(Arg::with_name("from_wallet_id")
.help("The ID of the source wallet")
.required(true)
.index(1))
.arg(Arg::with_name("to_wallet_id")
.help("The ID of the destination wallet")
.required(true)
.index(2))
.arg(Arg::with_name("amount")
.help("The amount to transfer")
.required(true)
.index(3))
.arg(Arg::with_name("currency")
.help("The currency of the accounts")
.required(true)
.index(4)),
)
.get_matches();
}