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

import NitroModules

/// See ``HybridOneCalendarSpec``
public protocol HybridOneCalendarSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getPermissionStatus() throws -> CalendarPermissionStatus
  func requestPermission() throws -> Promise<CalendarPermissionStatus>
  func list(startMs: Double, endMs: Double, limit: Double) throws -> Promise<[CalendarEvent]>
  func create(input: CalendarEventInput) throws -> Promise<String>
  func update(identifier: String, originalStartMs: Double, changes: CalendarEventChanges) throws -> Promise<CalendarEvent>
  func remove(identifier: String, startMs: Double) throws -> Promise<Void>
  func getRemindersPermissionStatus() throws -> CalendarPermissionStatus
  func requestRemindersPermission() throws -> Promise<CalendarPermissionStatus>
  func listReminders(limit: Double, includeCompleted: Bool) throws -> Promise<[ReminderInfo]>
  func createReminder(input: ReminderInput) throws -> Promise<String>
  func setReminderCompleted(identifier: String, completed: Bool) throws -> Promise<Void>
  func removeReminder(identifier: String) throws -> Promise<Void>
}

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

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

/**
 * A Swift base-protocol representing the OneCalendar HybridObject.
 * Implement this protocol to create Swift-based instances of OneCalendar.
 * ```swift
 * class HybridOneCalendar : HybridOneCalendarSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneCalendarSpec = HybridOneCalendarSpec_protocol & HybridOneCalendarSpec_base
