///
/// CropRatio.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 `CropRatio`, backed by a C++ struct.
 */
public typealias CropRatio = margelo.nitro.multipleimagepicker.CropRatio

public extension CropRatio {
  private typealias bridge = margelo.nitro.multipleimagepicker.bridge.swift

  /**
   * Create a new instance of `CropRatio`.
   */
  init(title: String?, width: Double, height: Double) {
    self.init({ () -> bridge.std__optional_std__string_ in
      if let __unwrappedValue = title {
        return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
      } else {
        return .init()
      }
    }(), width, height)
  }

  @inline(__always)
  var title: String? {
    return { () -> String? in
      if bridge.has_value_std__optional_std__string_(self.__title) {
        let __unwrapped = bridge.get_std__optional_std__string_(self.__title)
        return String(__unwrapped)
      } else {
        return nil
      }
    }()
  }
  
  @inline(__always)
  var width: Double {
    return self.__width
  }
  
  @inline(__always)
  var height: Double {
    return self.__height
  }
}
