#if !__has_include(<AVFCapture/AVProVideoStorage.h>)
/*
    File:  AVProVideoStorage.h

    Framework:  AVFoundation
 
    Copyright 2026 Apple Inc. All rights reserved.
*/

#import <AVFoundation/AVFCapture.h>

NS_ASSUME_NONNULL_BEGIN

#pragma mark - AVProVideoStorage

/// A class to track and manage pre-allocated storage for high data rate video capture.
///
/// `AVProVideoStorage` is a singleton that manages system-wide pre-allocated storage used during high data rate video capture
/// to ensure I/O determinism and sustain high bandwidth captures (e.g. ProRes).
API_AVAILABLE(macos(27.0), ios(27.0), macCatalyst(27.0), tvos(27.0)) API_UNAVAILABLE(visionos) API_UNAVAILABLE(watchos)
@interface AVProVideoStorage : NSObject

/// Returns the singleton instance for Pro Video Storage.
///
/// - Returns: An instance of the Pro Video Storage class if supported; otherwise, `nil`.
@property(class, readonly, nullable) AVProVideoStorage *sharedStorage;

/// Whether Pro Video Storage is supported in its current configuration.
///
/// - Returns: `YES` if the device and OS support Pro Video Storage functionality; otherwise, `NO`.
@property(class, readonly, getter=isSupported) BOOL supported;

/// Opens the Pro Video Storage UI in Settings app.
///
/// Presents system UI that allows the user to adjust pre-allocated storage capacity.
- (void)openSettings;

/// Initial size of Pro Video Storage in bytes.
///
/// The initial capacity is defined by the user via the Settings app.
///
/// - Returns: 0 if Pro Video Storage is not configured or -1 if there was a failure while extracting information from it.
@property(nonatomic, readonly) NSInteger initialCapacity;

/// Current size of Pro Video Storage in bytes.
///
/// The remaining capacity decreases as recordings are captured.
///
/// - Returns: 0 if Pro Video Storage is not configured or -1 if there was a failure while extracting information from it.
@property(nonatomic, readonly) NSInteger remainingCapacity;

/// Indicates whether Pro Video Storage is currently busy.
///
/// A value of `YES` indicates that Pro Video Storage is currently being modified (e.g., during capacity changes or file creation/deletion).
/// While this is `YES`, if a client tries to start a video capture an exception will be raised.
/// This property is key-value observable.
@property(nonatomic, readonly, getter=isBusy) BOOL busy;

@end

NS_ASSUME_NONNULL_END

#else
#import <AVFCapture/AVProVideoStorage.h>
#endif
