use crate::error::Result; use crate::{LicenseCheckStatus, activate_license, check_license, deactivate_license}; use tauri::{Runtime, WebviewWindow, command}; #[command] pub async fn check(window: WebviewWindow) -> Result { check_license(&window).await } #[command] pub async fn activate(license_key: &str, window: WebviewWindow) -> Result<()> { activate_license(&window, license_key).await } #[command] pub async fn deactivate(window: WebviewWindow) -> Result<()> { deactivate_license(&window).await }