//
//  HMNumberRange.h
//  HomeKit
//
//  Copyright (c) 2017 Apple Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <HomeKit/HMDefines.h>

NS_HEADER_AUDIT_BEGIN(nullability, sendability)

/*!
 * @brief This class describes a range of numbers: [min, max]
 *
 */
HM_EXTERN NS_SWIFT_SENDABLE API_AVAILABLE(ios(11.0), watchos(4.0), tvos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(macos)
@interface HMNumberRange : NSObject

- (instancetype)init NS_UNAVAILABLE;

/*!
 * @brief Initializes a new range of numbers
 *
 * @param minValue The minimum value of the range.
 *
 * @param maxValue The maximum value of the range.
 */
+ (instancetype)numberRangeWithMinValue:(NSNumber *)minValue maxValue:(NSNumber *)maxValue;

/*!
 * @brief Initializes a new range of numbers. The maximum value is set to a large value.
 *
 * @param minValue The minimum value of the range.
 *
 */
+ (instancetype)numberRangeWithMinValue:(NSNumber *)minValue;

/*!
 * @brief Initializes a new range of numbers. The minimum value is set to a small value.
 *
 * @param maxValue The maximum value of the range.
 *
 */
+ (instancetype)numberRangeWithMaxValue:(NSNumber *)maxValue;

/*!
 * @brief The minimum value of the range.
 */
@property (nullable, nonatomic, readonly, strong) NSNumber *minValue;

/*!
 * @brief The maximum value of the range.
 */
@property (nullable, nonatomic, readonly, strong) NSNumber *maxValue;

@end

NS_HEADER_AUDIT_END(nullability, sendability)
