import SwiftRs
import Tauri
import UIKit
import WebKit

class PingArgs: Decodable {
  let value: String?
}

class ExamplePlugin: Plugin {
  @objc public func ping(_ invoke: Invoke) throws {
    let args = try invoke.parseArgs(PingArgs.self)
    invoke.resolve(["value": args.value ?? ""])
  }

  @objc public func getVpnStatus(_ invoke: Invoke) {
    invoke.resolve(["running": false])
  }
}

@_cdecl("init_plugin_vpnservice")
func initPlugin() -> Plugin {
  return ExamplePlugin()
}
