///
/// HybridOneNotificationsSpec.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

import NitroModules

/// See ``HybridOneNotificationsSpec``
public protocol HybridOneNotificationsSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getPermissions() throws -> Promise<NativePermissionResponse>
  func requestPermissions(options: NativePermissionRequest) throws -> Promise<NativePermissionResponse>
  func getBadgeCount() throws -> Promise<Double>
  func setBadgeCount(count: Double) throws -> Promise<Bool>
  func setNotificationCategory(category: NativeNotificationCategory) throws -> Promise<NativeNotificationCategory>
  func getNotificationCategories() throws -> Promise<[NativeNotificationCategory]>
  func deleteNotificationCategory(identifier: String) throws -> Promise<Bool>
  func setNotificationChannel(channelId: String, channel: NativeChannelInput) throws -> Promise<NativeChannel?>
  func getNotificationChannel(channelId: String) throws -> Promise<NativeChannel?>
  func getNotificationChannels() throws -> Promise<[NativeChannel]>
  func deleteNotificationChannel(channelId: String) throws -> Promise<Void>
  func scheduleNotification(request: NativeScheduleInput) throws -> Promise<String>
  func cancelScheduledNotification(identifier: String) throws -> Promise<Void>
  func cancelAllScheduledNotifications() throws -> Promise<Void>
  func getAllScheduledNotifications() throws -> Promise<[NativeNotificationRequest]>
  func getPresentedNotifications() throws -> Promise<[NativeNotification]>
  func dismissNotification(identifier: String) throws -> Promise<Void>
  func dismissAllNotifications() throws -> Promise<Void>
  func getDevicePushToken() throws -> Promise<NativePushToken>
  func setListeners(onReceived: @escaping (_ requestId: String, _ notification: NativeNotification) -> Void, onResponse: @escaping (_ response: NativeNotificationResponse) -> Void, onPushToken: @escaping (_ token: NativePushToken) -> Void) throws -> Void
  func presentNotification(requestId: String, behavior: NotificationBehavior) throws -> Void
  func getLastNotificationResponse() throws -> NativeNotificationResponse?
  func clearLastNotificationResponse() throws -> Void
}

public extension HybridOneNotificationsSpec_protocol {
  /// Default implementation of ``HybridObject.toString``
  func toString() -> String {
    return "[HybridObject OneNotifications]"
  }
}

/// See ``HybridOneNotificationsSpec``
open class HybridOneNotificationsSpec_base {
  private weak var cxxWrapper: HybridOneNotificationsSpec_cxx? = nil
  public init() { }
  public func getCxxWrapper() -> HybridOneNotificationsSpec_cxx {
  #if DEBUG
    guard self is any HybridOneNotificationsSpec else {
      fatalError("`self` is not a `HybridOneNotificationsSpec`! Did you accidentally inherit from `HybridOneNotificationsSpec_base` instead of `HybridOneNotificationsSpec`?")
    }
  #endif
    if let cxxWrapper = self.cxxWrapper {
      return cxxWrapper
    } else {
      let cxxWrapper = HybridOneNotificationsSpec_cxx(self as! any HybridOneNotificationsSpec)
      self.cxxWrapper = cxxWrapper
      return cxxWrapper
    }
  }
}

/**
 * A Swift base-protocol representing the OneNotifications HybridObject.
 * Implement this protocol to create Swift-based instances of OneNotifications.
 * ```swift
 * class HybridOneNotifications : HybridOneNotificationsSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneNotificationsSpec = HybridOneNotificationsSpec_protocol & HybridOneNotificationsSpec_base
