///
/// CropRatio.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 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)
  }

  var title: String? {
    @inline(__always)
    get {
      return { () -> String? in
        if let __unwrapped = self.__title.value {
          return String(__unwrapped)
        } else {
          return nil
        }
      }()
    }
    @inline(__always)
    set {
      self.__title = { () -> bridge.std__optional_std__string_ in
        if let __unwrappedValue = newValue {
          return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
        } else {
          return .init()
        }
      }()
    }
  }
  
  var width: Double {
    @inline(__always)
    get {
      return self.__width
    }
    @inline(__always)
    set {
      self.__width = newValue
    }
  }
  
  var height: Double {
    @inline(__always)
    get {
      return self.__height
    }
    @inline(__always)
    set {
      self.__height = newValue
    }
  }
}
