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

import NitroModules

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

public extension NativeNotificationCategory {
  private typealias bridge = margelo.nitro.one.bridge.swift

  /**
   * Create a new instance of `NativeNotificationCategory`.
   */
  init(identifier: String, actions: [NativeNotificationAction], options: NativeNotificationCategoryOptions?) {
    self.init(std.string(identifier), { () -> bridge.std__vector_NativeNotificationAction_ in
      var __vector = bridge.create_std__vector_NativeNotificationAction_(actions.count)
      for __item in actions {
        __vector.push_back(__item)
      }
      return __vector
    }(), { () -> bridge.std__optional_NativeNotificationCategoryOptions_ in
      if let __unwrappedValue = options {
        return bridge.create_std__optional_NativeNotificationCategoryOptions_(__unwrappedValue)
      } else {
        return .init()
      }
    }())
  }

  @inline(__always)
  var identifier: String {
    return String(self.__identifier)
  }
  
  @inline(__always)
  var actions: [NativeNotificationAction] {
    return self.__actions.map({ __item in __item })
  }
  
  @inline(__always)
  var options: NativeNotificationCategoryOptions? {
    return self.__options.value
  }
}
