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

import NitroModules

/**
 * Represents an instance of `NitroAvailablePurchasesIosOptions`, backed by a C++ struct.
 */
public typealias NitroAvailablePurchasesIosOptions = margelo.nitro.iap.NitroAvailablePurchasesIosOptions

public extension NitroAvailablePurchasesIosOptions {
  private typealias bridge = margelo.nitro.iap.bridge.swift

  /**
   * Create a new instance of `NitroAvailablePurchasesIosOptions`.
   */
  init(alsoPublishToEventListener: Bool?, onlyIncludeActiveItems: Bool?, alsoPublishToEventListenerIOS: Bool?, includeSuspendedAndroid: Bool?, onlyIncludeActiveItemsIOS: Bool?) {
    self.init({ () -> bridge.std__optional_bool_ in
      if let __unwrappedValue = alsoPublishToEventListener {
        return bridge.create_std__optional_bool_(__unwrappedValue)
      } else {
        return .init()
      }
    }(), { () -> bridge.std__optional_bool_ in
      if let __unwrappedValue = onlyIncludeActiveItems {
        return bridge.create_std__optional_bool_(__unwrappedValue)
      } else {
        return .init()
      }
    }(), { () -> bridge.std__optional_bool_ in
      if let __unwrappedValue = alsoPublishToEventListenerIOS {
        return bridge.create_std__optional_bool_(__unwrappedValue)
      } else {
        return .init()
      }
    }(), { () -> bridge.std__optional_bool_ in
      if let __unwrappedValue = includeSuspendedAndroid {
        return bridge.create_std__optional_bool_(__unwrappedValue)
      } else {
        return .init()
      }
    }(), { () -> bridge.std__optional_bool_ in
      if let __unwrappedValue = onlyIncludeActiveItemsIOS {
        return bridge.create_std__optional_bool_(__unwrappedValue)
      } else {
        return .init()
      }
    }())
  }

  var alsoPublishToEventListener: Bool? {
    @inline(__always)
    get {
      return { () -> Bool? in
        if bridge.has_value_std__optional_bool_(self.__alsoPublishToEventListener) {
          let __unwrapped = bridge.get_std__optional_bool_(self.__alsoPublishToEventListener)
          return __unwrapped
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__alsoPublishToEventListener = { () -> bridge.std__optional_bool_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_bool_(__unwrappedValue)
        } else {
          return .init()
        }
      }()
    }
  }
  
  var onlyIncludeActiveItems: Bool? {
    @inline(__always)
    get {
      return { () -> Bool? in
        if bridge.has_value_std__optional_bool_(self.__onlyIncludeActiveItems) {
          let __unwrapped = bridge.get_std__optional_bool_(self.__onlyIncludeActiveItems)
          return __unwrapped
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__onlyIncludeActiveItems = { () -> bridge.std__optional_bool_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_bool_(__unwrappedValue)
        } else {
          return .init()
        }
      }()
    }
  }
  
  var alsoPublishToEventListenerIOS: Bool? {
    @inline(__always)
    get {
      return { () -> Bool? in
        if bridge.has_value_std__optional_bool_(self.__alsoPublishToEventListenerIOS) {
          let __unwrapped = bridge.get_std__optional_bool_(self.__alsoPublishToEventListenerIOS)
          return __unwrapped
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__alsoPublishToEventListenerIOS = { () -> bridge.std__optional_bool_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_bool_(__unwrappedValue)
        } else {
          return .init()
        }
      }()
    }
  }
  
  var includeSuspendedAndroid: Bool? {
    @inline(__always)
    get {
      return { () -> Bool? in
        if bridge.has_value_std__optional_bool_(self.__includeSuspendedAndroid) {
          let __unwrapped = bridge.get_std__optional_bool_(self.__includeSuspendedAndroid)
          return __unwrapped
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__includeSuspendedAndroid = { () -> bridge.std__optional_bool_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_bool_(__unwrappedValue)
        } else {
          return .init()
        }
      }()
    }
  }
  
  var onlyIncludeActiveItemsIOS: Bool? {
    @inline(__always)
    get {
      return { () -> Bool? in
        if bridge.has_value_std__optional_bool_(self.__onlyIncludeActiveItemsIOS) {
          let __unwrapped = bridge.get_std__optional_bool_(self.__onlyIncludeActiveItemsIOS)
          return __unwrapped
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__onlyIncludeActiveItemsIOS = { () -> bridge.std__optional_bool_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_bool_(__unwrappedValue)
        } else {
          return .init()
        }
      }()
    }
  }
}
