use std::sync::Arc;
use tauri::{AppHandle, Runtime, State, Webview};
use super::TrayBlink;
use crate::commands::caller;
use crate::error::Result;
use crate::Shared;
#[tauri::command(rename_all = "snake_case")]
pub async fn badge_set<R: Runtime>(app: AppHandle<R>, webview: Webview<R>, state: State<'_, Arc<Shared>>, count: Option<u64>) -> Result<()> {
caller(&state, &webview)?;
super::set(&app, &state, count).await;
Ok(())
}
#[tauri::command(rename_all = "snake_case")]
pub async fn attention_request<R: Runtime>(app: AppHandle<R>, webview: Webview<R>, state: State<'_, Arc<Shared>>, critical: bool, label: Option<String>) -> Result<()> {
caller(&state, &webview)?;
super::attention(&app, &state, critical, label.as_deref());
Ok(())
}
#[tauri::command(rename_all = "snake_case")]
pub async fn tray_blink<R: Runtime>(app: AppHandle<R>, webview: Webview<R>, state: State<'_, Arc<Shared>>, blink: Option<TrayBlink>) -> Result<()> {
caller(&state, &webview)?;
super::tray_blink(&app, state.inner(), blink)
}