/**
 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
 *
 * Do not edit this file as changes may cause incorrect behavior and will be lost
 * once the code is regenerated.
 *
 * @generated by codegen project: GenerateModuleObjCpp
 *
 * We create an umbrella header (and corresponding implementation) here since
 * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
 * must have a single output. More files => more genrule()s => slower builds.
 */

#ifndef __cplusplus
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
#endif

// Avoid multiple includes of RNReactNativeFsSpec symbols
#ifndef RNReactNativeFsSpec_H
#define RNReactNativeFsSpec_H

#import <Foundation/Foundation.h>
#import <RCTRequired/RCTRequired.h>
#import <RCTTypeSafety/RCTConvertHelpers.h>
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTCxxConvert.h>
#import <React/RCTManagedPointer.h>
#import <ReactCommon/RCTTurboModule.h>
#import <optional>
#import <vector>


NS_ASSUME_NONNULL_BEGIN
namespace JS {
  namespace NativeReactNativeFs {
    struct FileOptionsT {
      NSString *NSFileProtectionKey() const;

      FileOptionsT(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_FileOptionsT)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_FileOptionsT:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct NativeDownloadFileOptionsT {
      double jobId() const;
      NSString *fromUrl() const;
      NSString *toFile() const;
      bool background() const;
      double backgroundTimeout() const;
      bool cacheable() const;
      double connectionTimeout() const;
      bool discretionary() const;
      id<NSObject> headers() const;
      double progressDivider() const;
      double progressInterval() const;
      double readTimeout() const;
      bool hasBeginCallback() const;
      bool hasProgressCallback() const;
      bool hasResumableCallback() const;

      NativeDownloadFileOptionsT(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_NativeDownloadFileOptionsT)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_NativeDownloadFileOptionsT:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct MkdirOptionsT {
      std::optional<bool> NSURLIsExcludedFromBackupKey() const;
      NSString *NSFileProtectionKey() const;

      MkdirOptionsT(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_MkdirOptionsT)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_MkdirOptionsT:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct PickFileOptionsT {
      facebook::react::LazyVector<NSString *> mimeTypes() const;
      NSString *pickerType() const;
      id<NSObject> fileExtensions() const;

      PickFileOptionsT(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_PickFileOptionsT)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_PickFileOptionsT:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct TouchOptions {
      std::optional<double> ctime() const;
      std::optional<double> mtime() const;

      TouchOptions(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_TouchOptions)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_TouchOptions:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct NativeUploadFileOptionsT {
      double jobId() const;
      NSString *toUrl() const;
      std::optional<bool> binaryStreamOnly() const;
      id<NSObject> files() const;
      id<NSObject> _Nullable headers() const;
      id<NSObject> _Nullable fields() const;
      NSString *method() const;
      bool hasBeginCallback() const;
      bool hasProgressCallback() const;

      NativeUploadFileOptionsT(NSDictionary *const v) : _v(v) {}
    private:
      NSDictionary *_v;
    };
  }
}

@interface RCTCxxConvert (NativeReactNativeFs_NativeUploadFileOptionsT)
+ (RCTManagedPointer *)JS_NativeReactNativeFs_NativeUploadFileOptionsT:(id)json;
@end
namespace JS {
  namespace NativeReactNativeFs {
    struct Constants {

      struct Builder {
        struct Input {
          RCTRequired<NSString *> CachesDirectoryPath;
          RCTRequired<NSString *> DocumentDirectoryPath;
          RCTRequired<NSString *> DownloadDirectoryPath;
          RCTRequired<NSString *> ExternalCachesDirectoryPath;
          RCTRequired<NSString *> ExternalDirectoryPath;
          RCTRequired<NSString *> ExternalStorageDirectoryPath;
          NSString *MainBundlePath;
          RCTRequired<NSString *> TemporaryDirectoryPath;
          RCTRequired<NSString *> FileTypeRegular;
          RCTRequired<NSString *> FileTypeDirectory;
          RCTRequired<double> DocumentDirectory;
          NSString *LibraryDirectoryPath;
          NSString *PicturesDirectoryPath;
          NSString *RoamingDirectoryPath;
          NSString *FileProtectionKeys;
        };

        /** Initialize with a set of values */
        Builder(const Input i);
        /** Initialize with an existing Constants */
        Builder(Constants i);
        /** Builds the object. Generally used only by the infrastructure. */
        NSDictionary *buildUnsafeRawValue() const { return _factory(); };
      private:
        NSDictionary *(^_factory)(void);
      };

      static Constants fromUnsafeRawValue(NSDictionary *const v) { return {v}; }
      NSDictionary *unsafeRawValue() const { return _v; }
    private:
      Constants(NSDictionary *const v) : _v(v) {}
      NSDictionary *_v;
    };
  }
}
@protocol NativeReactNativeFsSpec <RCTBridgeModule, RCTTurboModule>

- (void)addListener:(NSString *)event;
- (void)removeListeners:(double)count;
- (void)appendFile:(NSString *)path
               b64:(NSString *)b64
           resolve:(RCTPromiseResolveBlock)resolve
            reject:(RCTPromiseRejectBlock)reject;
- (void)copyFile:(NSString *)from
            into:(NSString *)into
         options:(JS::NativeReactNativeFs::FileOptionsT &)options
         resolve:(RCTPromiseResolveBlock)resolve
          reject:(RCTPromiseRejectBlock)reject;
- (void)downloadFile:(JS::NativeReactNativeFs::NativeDownloadFileOptionsT &)options
             resolve:(RCTPromiseResolveBlock)resolve
              reject:(RCTPromiseRejectBlock)reject;
- (void)exists:(NSString *)path
       resolve:(RCTPromiseResolveBlock)resolve
        reject:(RCTPromiseRejectBlock)reject;
- (void)getFSInfo:(RCTPromiseResolveBlock)resolve
           reject:(RCTPromiseRejectBlock)reject;
- (void)hash:(NSString *)path
   algorithm:(NSString *)algorithm
     resolve:(RCTPromiseResolveBlock)resolve
      reject:(RCTPromiseRejectBlock)reject;
- (void)mkdir:(NSString *)path
      options:(JS::NativeReactNativeFs::MkdirOptionsT &)options
      resolve:(RCTPromiseResolveBlock)resolve
       reject:(RCTPromiseRejectBlock)reject;
- (void)moveFile:(NSString *)from
            into:(NSString *)into
         options:(JS::NativeReactNativeFs::FileOptionsT &)options
         resolve:(RCTPromiseResolveBlock)resolve
          reject:(RCTPromiseRejectBlock)reject;
- (void)pickFile:(JS::NativeReactNativeFs::PickFileOptionsT &)options
         resolve:(RCTPromiseResolveBlock)resolve
          reject:(RCTPromiseRejectBlock)reject;
- (void)read:(NSString *)path
      length:(double)length
    position:(double)position
     resolve:(RCTPromiseResolveBlock)resolve
      reject:(RCTPromiseRejectBlock)reject;
- (void)readFile:(NSString *)path
         resolve:(RCTPromiseResolveBlock)resolve
          reject:(RCTPromiseRejectBlock)reject;
- (void)readDir:(NSString *)path
        resolve:(RCTPromiseResolveBlock)resolve
         reject:(RCTPromiseRejectBlock)reject;
- (void)stat:(NSString *)path
     resolve:(RCTPromiseResolveBlock)resolve
      reject:(RCTPromiseRejectBlock)reject;
- (void)stopDownload:(double)jobId;
- (void)stopUpload:(double)jobId;
- (void)touch:(NSString *)path
      options:(JS::NativeReactNativeFs::TouchOptions &)options
      resolve:(RCTPromiseResolveBlock)resolve
       reject:(RCTPromiseRejectBlock)reject;
- (void)unlink:(NSString *)path
       resolve:(RCTPromiseResolveBlock)resolve
        reject:(RCTPromiseRejectBlock)reject;
- (void)uploadFiles:(JS::NativeReactNativeFs::NativeUploadFileOptionsT &)options
            resolve:(RCTPromiseResolveBlock)resolve
             reject:(RCTPromiseRejectBlock)reject;
- (void)write:(NSString *)path
          b64:(NSString *)b64
     position:(double)position
      resolve:(RCTPromiseResolveBlock)resolve
       reject:(RCTPromiseRejectBlock)reject;
- (void)writeFile:(NSString *)path
              b64:(NSString *)b64
          options:(JS::NativeReactNativeFs::FileOptionsT &)options
          resolve:(RCTPromiseResolveBlock)resolve
           reject:(RCTPromiseRejectBlock)reject;
- (void)copyFileAssets:(NSString *)from
                  into:(NSString *)into
               resolve:(RCTPromiseResolveBlock)resolve
                reject:(RCTPromiseRejectBlock)reject;
- (void)copyFileRes:(NSString *)from
               into:(NSString *)into
            resolve:(RCTPromiseResolveBlock)resolve
             reject:(RCTPromiseRejectBlock)reject;
- (void)existsAssets:(NSString *)path
             resolve:(RCTPromiseResolveBlock)resolve
              reject:(RCTPromiseRejectBlock)reject;
- (void)existsRes:(NSString *)path
          resolve:(RCTPromiseResolveBlock)resolve
           reject:(RCTPromiseRejectBlock)reject;
- (void)getAllExternalFilesDirs:(RCTPromiseResolveBlock)resolve
                         reject:(RCTPromiseRejectBlock)reject;
- (void)readFileAssets:(NSString *)path
               resolve:(RCTPromiseResolveBlock)resolve
                reject:(RCTPromiseRejectBlock)reject;
- (void)readFileRes:(NSString *)path
            resolve:(RCTPromiseResolveBlock)resolve
             reject:(RCTPromiseRejectBlock)reject;
- (void)readDirAssets:(NSString *)path
              resolve:(RCTPromiseResolveBlock)resolve
               reject:(RCTPromiseRejectBlock)reject;
- (void)scanFile:(NSString *)path
         resolve:(RCTPromiseResolveBlock)resolve
          reject:(RCTPromiseRejectBlock)reject;
- (void)setReadable:(NSString *)filepath
           readable:(BOOL)readable
          ownerOnly:(BOOL)ownerOnly
            resolve:(RCTPromiseResolveBlock)resolve
             reject:(RCTPromiseRejectBlock)reject;
- (void)copyAssetsFileIOS:(NSString *)imageUri
                 destPath:(NSString *)destPath
                    width:(double)width
                   height:(double)height
                    scale:(double)scale
              compression:(double)compression
               resizeMode:(NSString *)resizeMode
                  resolve:(RCTPromiseResolveBlock)resolve
                   reject:(RCTPromiseRejectBlock)reject;
- (void)copyAssetsVideoIOS:(NSString *)imageUri
                  destPath:(NSString *)destPath
                   resolve:(RCTPromiseResolveBlock)resolve
                    reject:(RCTPromiseRejectBlock)reject;
- (void)completeHandlerIOS:(double)jobId;
- (void)isResumable:(double)jobId
            resolve:(RCTPromiseResolveBlock)resolve
             reject:(RCTPromiseRejectBlock)reject;
- (void)pathForBundle:(NSString *)bundle
              resolve:(RCTPromiseResolveBlock)resolve
               reject:(RCTPromiseRejectBlock)reject;
- (void)pathForGroup:(NSString *)group
             resolve:(RCTPromiseResolveBlock)resolve
              reject:(RCTPromiseRejectBlock)reject;
- (void)resumeDownload:(double)jobId;
- (void)copyFolder:(NSString *)from
              into:(NSString *)into
           resolve:(RCTPromiseResolveBlock)resolve
            reject:(RCTPromiseRejectBlock)reject;
- (facebook::react::ModuleConstants<JS::NativeReactNativeFs::Constants::Builder>)constantsToExport;
- (facebook::react::ModuleConstants<JS::NativeReactNativeFs::Constants::Builder>)getConstants;

@end

@interface NativeReactNativeFsSpecBase : NSObject {
@protected
facebook::react::EventEmitterCallback _eventEmitterCallback;
}
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;


@end

namespace facebook::react {
  /**
   * ObjC++ class for module 'NativeReactNativeFs'
   */
  class JSI_EXPORT NativeReactNativeFsSpecJSI : public ObjCTurboModule {
  public:
    NativeReactNativeFsSpecJSI(const ObjCTurboModule::InitParams &params);
  };
} // namespace facebook::react
inline NSString *JS::NativeReactNativeFs::FileOptionsT::NSFileProtectionKey() const
{
  id const p = _v[@"NSFileProtectionKey"];
  return RCTBridgingToOptionalString(p);
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::jobId() const
{
  id const p = _v[@"jobId"];
  return RCTBridgingToDouble(p);
}
inline NSString *JS::NativeReactNativeFs::NativeDownloadFileOptionsT::fromUrl() const
{
  id const p = _v[@"fromUrl"];
  return RCTBridgingToString(p);
}
inline NSString *JS::NativeReactNativeFs::NativeDownloadFileOptionsT::toFile() const
{
  id const p = _v[@"toFile"];
  return RCTBridgingToString(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::background() const
{
  id const p = _v[@"background"];
  return RCTBridgingToBool(p);
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::backgroundTimeout() const
{
  id const p = _v[@"backgroundTimeout"];
  return RCTBridgingToDouble(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::cacheable() const
{
  id const p = _v[@"cacheable"];
  return RCTBridgingToBool(p);
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::connectionTimeout() const
{
  id const p = _v[@"connectionTimeout"];
  return RCTBridgingToDouble(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::discretionary() const
{
  id const p = _v[@"discretionary"];
  return RCTBridgingToBool(p);
}
inline id<NSObject> JS::NativeReactNativeFs::NativeDownloadFileOptionsT::headers() const
{
  id const p = _v[@"headers"];
  return p;
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::progressDivider() const
{
  id const p = _v[@"progressDivider"];
  return RCTBridgingToDouble(p);
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::progressInterval() const
{
  id const p = _v[@"progressInterval"];
  return RCTBridgingToDouble(p);
}
inline double JS::NativeReactNativeFs::NativeDownloadFileOptionsT::readTimeout() const
{
  id const p = _v[@"readTimeout"];
  return RCTBridgingToDouble(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::hasBeginCallback() const
{
  id const p = _v[@"hasBeginCallback"];
  return RCTBridgingToBool(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::hasProgressCallback() const
{
  id const p = _v[@"hasProgressCallback"];
  return RCTBridgingToBool(p);
}
inline bool JS::NativeReactNativeFs::NativeDownloadFileOptionsT::hasResumableCallback() const
{
  id const p = _v[@"hasResumableCallback"];
  return RCTBridgingToBool(p);
}
inline std::optional<bool> JS::NativeReactNativeFs::MkdirOptionsT::NSURLIsExcludedFromBackupKey() const
{
  id const p = _v[@"NSURLIsExcludedFromBackupKey"];
  return RCTBridgingToOptionalBool(p);
}
inline NSString *JS::NativeReactNativeFs::MkdirOptionsT::NSFileProtectionKey() const
{
  id const p = _v[@"NSFileProtectionKey"];
  return RCTBridgingToOptionalString(p);
}
inline facebook::react::LazyVector<NSString *> JS::NativeReactNativeFs::PickFileOptionsT::mimeTypes() const
{
  id const p = _v[@"mimeTypes"];
  return RCTBridgingToVec(p, ^NSString *(id itemValue_0) { return RCTBridgingToString(itemValue_0); });
}
inline NSString *JS::NativeReactNativeFs::PickFileOptionsT::pickerType() const
{
  id const p = _v[@"pickerType"];
  return RCTBridgingToString(p);
}
inline id<NSObject> JS::NativeReactNativeFs::PickFileOptionsT::fileExtensions() const
{
  id const p = _v[@"fileExtensions"];
  return p;
}
inline std::optional<double> JS::NativeReactNativeFs::TouchOptions::ctime() const
{
  id const p = _v[@"ctime"];
  return RCTBridgingToOptionalDouble(p);
}
inline std::optional<double> JS::NativeReactNativeFs::TouchOptions::mtime() const
{
  id const p = _v[@"mtime"];
  return RCTBridgingToOptionalDouble(p);
}
inline double JS::NativeReactNativeFs::NativeUploadFileOptionsT::jobId() const
{
  id const p = _v[@"jobId"];
  return RCTBridgingToDouble(p);
}
inline NSString *JS::NativeReactNativeFs::NativeUploadFileOptionsT::toUrl() const
{
  id const p = _v[@"toUrl"];
  return RCTBridgingToString(p);
}
inline std::optional<bool> JS::NativeReactNativeFs::NativeUploadFileOptionsT::binaryStreamOnly() const
{
  id const p = _v[@"binaryStreamOnly"];
  return RCTBridgingToOptionalBool(p);
}
inline id<NSObject> JS::NativeReactNativeFs::NativeUploadFileOptionsT::files() const
{
  id const p = _v[@"files"];
  return p;
}
inline id<NSObject> _Nullable JS::NativeReactNativeFs::NativeUploadFileOptionsT::headers() const
{
  id const p = _v[@"headers"];
  return p;
}
inline id<NSObject> _Nullable JS::NativeReactNativeFs::NativeUploadFileOptionsT::fields() const
{
  id const p = _v[@"fields"];
  return p;
}
inline NSString *JS::NativeReactNativeFs::NativeUploadFileOptionsT::method() const
{
  id const p = _v[@"method"];
  return RCTBridgingToOptionalString(p);
}
inline bool JS::NativeReactNativeFs::NativeUploadFileOptionsT::hasBeginCallback() const
{
  id const p = _v[@"hasBeginCallback"];
  return RCTBridgingToBool(p);
}
inline bool JS::NativeReactNativeFs::NativeUploadFileOptionsT::hasProgressCallback() const
{
  id const p = _v[@"hasProgressCallback"];
  return RCTBridgingToBool(p);
}
inline JS::NativeReactNativeFs::Constants::Builder::Builder(const Input i) : _factory(^{
  NSMutableDictionary *d = [NSMutableDictionary new];
  auto CachesDirectoryPath = i.CachesDirectoryPath.get();
  d[@"CachesDirectoryPath"] = CachesDirectoryPath;
  auto DocumentDirectoryPath = i.DocumentDirectoryPath.get();
  d[@"DocumentDirectoryPath"] = DocumentDirectoryPath;
  auto DownloadDirectoryPath = i.DownloadDirectoryPath.get();
  d[@"DownloadDirectoryPath"] = DownloadDirectoryPath;
  auto ExternalCachesDirectoryPath = i.ExternalCachesDirectoryPath.get();
  d[@"ExternalCachesDirectoryPath"] = ExternalCachesDirectoryPath;
  auto ExternalDirectoryPath = i.ExternalDirectoryPath.get();
  d[@"ExternalDirectoryPath"] = ExternalDirectoryPath;
  auto ExternalStorageDirectoryPath = i.ExternalStorageDirectoryPath.get();
  d[@"ExternalStorageDirectoryPath"] = ExternalStorageDirectoryPath;
  auto MainBundlePath = i.MainBundlePath;
  d[@"MainBundlePath"] = MainBundlePath;
  auto TemporaryDirectoryPath = i.TemporaryDirectoryPath.get();
  d[@"TemporaryDirectoryPath"] = TemporaryDirectoryPath;
  auto FileTypeRegular = i.FileTypeRegular.get();
  d[@"FileTypeRegular"] = FileTypeRegular;
  auto FileTypeDirectory = i.FileTypeDirectory.get();
  d[@"FileTypeDirectory"] = FileTypeDirectory;
  auto DocumentDirectory = i.DocumentDirectory.get();
  d[@"DocumentDirectory"] = @(DocumentDirectory);
  auto LibraryDirectoryPath = i.LibraryDirectoryPath;
  d[@"LibraryDirectoryPath"] = LibraryDirectoryPath;
  auto PicturesDirectoryPath = i.PicturesDirectoryPath;
  d[@"PicturesDirectoryPath"] = PicturesDirectoryPath;
  auto RoamingDirectoryPath = i.RoamingDirectoryPath;
  d[@"RoamingDirectoryPath"] = RoamingDirectoryPath;
  auto FileProtectionKeys = i.FileProtectionKeys;
  d[@"FileProtectionKeys"] = FileProtectionKeys;
  return d;
}) {}
inline JS::NativeReactNativeFs::Constants::Builder::Builder(Constants i) : _factory(^{
  return i.unsafeRawValue();
}) {}
NS_ASSUME_NONNULL_END
#endif // RNReactNativeFsSpec_H
