use crate::client::KeepClient;
use clap::Command;
use log::debug;

pub fn mode(
    client: &KeepClient,
    _cmd: &mut Command,
    settings: &crate::config::Settings,
    ids: &[i64],
) -> Result<(), anyhow::Error> {
    debug!("CLIENT_DELETE: Deleting items via remote server");

    for &id in ids {
        client.delete_item(id)?;
        if !settings.quiet {
            eprintln!("Deleted item {id}");
        }
    }

    Ok(())
}
