// Generated by Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
#pragma clang diagnostic push

#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif

#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if defined(__has_include) && __has_include(<uchar.h>)
#  include <uchar.h>
# elif !defined(__cplusplus) || __cplusplus < 201103L
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2  __attribute__((__ext_vector_type__(2)));
typedef float swift_float3  __attribute__((__ext_vector_type__(3)));
typedef float swift_float4  __attribute__((__ext_vector_type__(4)));
typedef double swift_double2  __attribute__((__ext_vector_type__(2)));
typedef double swift_double3  __attribute__((__ext_vector_type__(3)));
typedef double swift_double4  __attribute__((__ext_vector_type__(4)));
typedef int swift_int2  __attribute__((__ext_vector_type__(2)));
typedef int swift_int3  __attribute__((__ext_vector_type__(3)));
typedef int swift_int4  __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2  __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3  __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4  __attribute__((__ext_vector_type__(4)));
#endif

#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
#  define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
#  define SWIFT_CLASS_PROPERTY(...)
# endif
#endif

#if defined(__has_attribute) && __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if defined(__has_attribute) && __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if defined(__has_attribute) && __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
#  define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
#  define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
#  define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
#  define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif

#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif

#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif

#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if defined(__has_attribute) && __has_attribute(objc_designated_initializer)
#  define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
#  define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type
# if defined(__has_feature) && __has_feature(generalized_swift_name)
#  define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_EXTRA _name : _type
# else
#  define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if defined(__has_feature) && __has_feature(modules)
@import AVFoundation;
@import UIKit;
@import CoreGraphics;
@import Foundation;
@import ObjectiveC;
@import QuartzCore;
@import CoreLocation;
@import GLKit;
@import CoreImage;
@import OpenGLES;
#endif

#import <PhotoEditorSDK/PhotoEditorSDK.h>

#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"

@interface AVCaptureDevice (SWIFT_EXTENSION(PhotoEditorSDK))
@end

@class UIColor;
@class NSCoder;

/// A <code>BorderedCollectionViewCell</code> is a cell that shows a border around the cell.
SWIFT_CLASS_NAMED("BorderedCollectionViewCell")
@interface PESDKBorderedCollectionViewCell : UICollectionViewCell
/// The color of the border.
@property (nonatomic, strong) UIColor * _Nonnull borderColor;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end

@class UIActivityIndicatorView;

/// An <code>ActivityBorderedCollectionViewCell</code> is a cell that shows a border around the cell and an
/// activity indicator in its center.
SWIFT_CLASS_NAMED("ActivityBorderedCollectionViewCell")
@interface PESDKActivityBorderedCollectionViewCell : PESDKBorderedCollectionViewCell
/// An activity indicator in the center of the cell.
@property (nonatomic, readonly, strong) UIActivityIndicatorView * _Nonnull activityIndicator;
/// :nodoc:
- (void)prepareForReuse;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

/// The tools that can be used in an instance of <code>AdjustToolController</code>.
/// <ul>
///   <li>
///     Brightness: Change the brightness of the image.
///   </li>
///   <li>
///     Contrast:   Change the contrast of the image.
///   </li>
///   <li>
///     Saturation: Change the saturation of the image.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, AdjustTool) {
/// Change the brightness of the image.
  AdjustToolBrightness = 0,
/// Change the contrast of the image.
  AdjustToolContrast = 1,
/// Change the saturation of the image.
  AdjustToolSaturation = 2,
/// Change the shadows of the image.
  AdjustToolShadows = 3,
/// Change the highlights of the image.
  AdjustToolHighlights = 4,
/// Change the exposure of the image.
  AdjustToolExposure = 5,
/// Change the clarity of the image.
  AdjustToolClarity = 6,
};

@class PESDKConfiguration;
@protocol PESDKPhotoEditToolControllerDelegate;
@class PESDKUndoController;
@class PESDKToolbarItem;
@class NSBundle;

/// A <code>PhotoEditToolController</code> is the base class for any tool controllers. Subclass this class if you
/// want to add additional tools to the editor.
SWIFT_CLASS_NAMED("PhotoEditToolController")
@interface PESDKPhotoEditToolController : UIViewController
/// The render mode that the preview image should be rendered with when this tool is active.
@property (nonatomic) PESDKRenderMode preferredRenderMode;
/// The configuration object that configures this tool.
@property (nonatomic, readonly, strong) PESDKConfiguration * _Nonnull configuration;
/// The <code>delegate</code> for the tool controller.
@property (nonatomic, readonly, weak) id <PESDKPhotoEditToolControllerDelegate> _Nullable delegate;
/// The <code>UndoController</code> associated with this tool controller.
@property (nonatomic, strong) PESDKUndoController * _Nullable undoController;
/// Creates a new photo edit tool controller with the given configuration.
/// \param configuration The configuration options to apply.
///
///
/// returns:
/// The initialized and configured photo edit tool controller object.
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
@property (nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle;
/// :nodoc:
@property (nonatomic, readonly) BOOL prefersStatusBarHidden;
/// If set to <code>true</code>, the default preview view is used. If set to <code>false</code>, the default preview view
/// is hidden and you are responsible for displaying the image.
@property (nonatomic, readonly) BOOL wantsDefaultPreviewView;
/// The scale factor that should be applied to the main preview view when this tool is on top of the stack.
/// Defaults to <code>nil</code>, which means that the zoom scale will be left untouched.
@property (nonatomic, readonly) CGFloat preferredDefaultPreviewViewScale;
/// If set to <code>true</code>, scrolling in the default preview view is enabled while this tool is on top of the stack.
/// Defaults to <code>false</code>.
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// The background color that should be used when this tool is active.
@property (nonatomic, readonly, strong) UIColor * _Nullable preferredPreviewBackgroundColor;
/// The insets that should be applied to the preview view when this tool is active.
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// The toolbar configuration item.
@property (nonatomic, readonly, strong) PESDKToolbarItem * _Nonnull toolbarItem;
/// Called when the photo edit model changes.
- (void)photoEditModelDidChange;
/// Called when this tool wants zooming enabled. Override this method to setup a proxy scroll
/// view for example.
- (void)setupForZoomAndPan;
/// Called when this tool wants zooming enabled and is about to be presented. Override this
/// method to reset your zoom scale if necessary.
- (void)resetForZoomAndPan;
/// Called when an instance of <code>PhotoEditViewController</code> lays out its subviews. This is
/// sometimes needed to adjust the layout of a tool that relies on the views of the photo edit
/// view controller.
- (void)editViewControllerDidLayoutSubviews;
/// Whether the tool is currently active.
@property (nonatomic, readonly) BOOL isActiveTool;
/// Notifies the tool controller that it is about to become the active tool.
/// important:
/// If you override this method, you must call <code>super</code> at some point in your implementation.
- (void)willBecomeActiveTool;
/// Notifies the tool controller that it became the active tool.
/// important:
/// If you override this method, you must call <code>super</code> at some point in your implementation.
- (void)didBecomeActiveTool;
/// Notifies the tool controller that it is about to resign being the active tool.
/// note:
/// This method will <em>not</em> be called if another tool is pushed above this tool.
/// It is only called if you pop the tool from the toolbar controller.
/// important:
/// If you override this method, you must call <code>super</code> at some point in your implementation.
- (void)willResignActiveTool;
/// Notifies the tool controller that it resigned being the active tool.
/// note:
/// This method will <em>not</em> be called if another tool is pushed above this tool.
/// It is only called if you pop the tool from the toolbar controller.
/// important:
/// If you override this method, you must call <code>super</code> at some point in your implementation.
- (void)didResignActiveTool;
/// Performs a model change without notifying the <code>delegate</code>.
/// \param changes The changes to apply to the model.
///
- (void)performLocalModelChanges:(SWIFT_NOESCAPE void (^ _Nonnull)(void))changes;
/// Whether a change to a model is local to the instance of <code>PhotoEditToolController</code> or not.
@property (nonatomic, readonly) BOOL isModelChangeLocal;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
@end

@class UIView;
@class UIScrollView;

/// A <code>StackLayoutToolController</code> presents a workspace view at the top and an accessory view at the
/// bottom. The accessory view is usually used for the menu, while the workspace view hosts any
/// other controls.
SWIFT_CLASS_NAMED("StackLayoutToolController")
@interface PESDKStackLayoutToolController : PESDKPhotoEditToolController
/// The workspace view. If you want to add any controls to your tool, you will most likely add
/// them to this view.
@property (nonatomic, strong) UIView * _Nonnull workspaceView;
/// The accessory view. This view usually only hosts the menu.
@property (nonatomic, strong) UIView * _Nonnull accessoryView;
/// If <code>wantsScrollingInDefaultPreviewViewEnabled</code> is true, this is the scroll view
/// that acts as a proxy scroll view for the underlying image scroll view.
@property (nonatomic, strong) UIScrollView * _Nullable toolControllerScrollView;
/// If ``wantsScrollingInDefaultPreviewViewEnabled<code>is true, this acts as the content view of the</code>toolControllerScrollView`.
@property (nonatomic, strong) UIView * _Nullable dummyScrollContentView;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
- (void)setupForZoomAndPan;
/// :nodoc:
- (void)resetForZoomAndPan;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// An <code>AdjustToolController</code> is reponsible for displaying the UI to adjust the brightness, contrast and saturation
/// of an image.
SWIFT_CLASS_NAMED("AdjustToolController")
@interface PESDKAdjustToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
- (void)photoEditModelDidChange;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

@class UICollectionView;

@interface PESDKAdjustToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end

@class UICollectionViewLayout;

@interface PESDKAdjustToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKAdjustToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKAdjustToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

@class PESDKButton;
@class PESDKToolControllerOptionsBuilder;

/// Options for configuring a <code>PhotoEditToolController</code>.
SWIFT_CLASS_NAMED("ToolControllerOptions")
@interface PESDKToolControllerOptions : NSObject
/// The background color of the accessory view. Unless this is set the configuration’s global background color,
/// will be used.
@property (nonatomic, readonly, strong) UIColor * _Nullable accessoryViewBackgroundColor;
/// A configuration closure to configure the toolbars title view.
@property (nonatomic, readonly, copy) void (^ _Nullable titleViewConfigurationClosure)(UIView * _Nonnull);
/// The tool’s background color. Defaults to the configuration’s global background color.
@property (nonatomic, readonly, strong) UIColor * _Nullable backgroundColor;
/// A configuration closure to configure the apply button displayed at the bottom right.
/// Defaults to a checkmark icon.
@property (nonatomic, readonly, copy) void (^ _Nullable applyButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// A configuration closure to configure the discard button displayed at the bottom left.
/// Defaults to a cross icon.
@property (nonatomic, readonly, copy) void (^ _Nullable discardButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// This closure will be called when a tool has been entered.
@property (nonatomic, readonly, copy) void (^ _Nullable didEnterToolClosure)(void);
/// The closure will be called when a tool is about to be left.
@property (nonatomic, readonly, copy) void (^ _Nullable willLeaveToolClosure)(void);
/// Creates a newly allocated instance of <code>ToolControllerOptions</code> using the default builder.
- (nonnull instancetype)init;
/// Creates a newly allocated instance of <code>ToolControllerOptions</code> using the given biulder.
/// \param editorBuilder A <code>ToolControllerOptionsBuilder</code> instance.
///
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKIconCaptionCollectionViewCell;
@class PESDKSlider;
@class PESDKAdjustToolControllerOptionsBuilder;

/// Options for configuring an <code>AdjustToolController</code>.
SWIFT_CLASS_NAMED("AdjustToolControllerOptions")
@interface PESDKAdjustToolControllerOptions : PESDKToolControllerOptions
/// This closure allows further configuration of the adjust tool buttons. The closure is called for
/// each adjust tool button and has the button and its corresponding adjust tool as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable adjustToolButtonConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull, enum AdjustTool);
/// This closure is called every time the user selects a tool.
@property (nonatomic, readonly, copy) void (^ _Nullable adjustToolSelectedClosure)(enum AdjustTool);
/// This closure can be used to configure the slider that is visible when selecting an adjust tool.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider and that is visible when selecting
/// an adjust tool.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the active <code>AdjustTool</code>
/// will be passed as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum AdjustTool);
/// Returns a newly allocated instance of <code>AdjustToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of <code>AdjustToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of <code>AdjustToolControllerOptions</code> using the given builder.
/// \param builder A <code>AdjustToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of <code>AdjustToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKAdjustToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>ToolControllerOptionsBuilder</code> for <code>ToolControllerOptions</code>.
SWIFT_CLASS_NAMED("ToolControllerOptionsBuilder")
@interface PESDKToolControllerOptionsBuilder : NSObject
/// The background color of the accessory view. Unless this is set the configuration’s global background color,
/// will be used.
@property (nonatomic, strong) UIColor * _Nullable accessoryViewBackgroundColor;
/// A configuration closure to configure the toolbars title view.
@property (nonatomic, copy) void (^ _Nullable titleViewConfigurationClosure)(UIView * _Nonnull);
/// The tools background color. If this property is <code>nil</code>, the <code>backgroundColor</code> property of the
/// <code>Configuration</code> will be used instead.
@property (nonatomic, strong) UIColor * _Nullable backgroundColor;
/// This closure will be called when a tool has been entered.
@property (nonatomic, copy) void (^ _Nullable didEnterToolClosure)(void);
/// The closure will be called when a tool is about to be left.
@property (nonatomic, copy) void (^ _Nullable willLeaveToolClosure)(void);
/// A configuration closure to configure the apply button displayed at the bottom right.
/// Defaults to a checkmark icon.
@property (nonatomic, copy) void (^ _Nullable applyButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// A configuration closure to configure the discard button displayed at the bottom left.
/// Defaults to a cross icon.
@property (nonatomic, copy) void (^ _Nullable discardButtonConfigurationClosure)(PESDKButton * _Nonnull);
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// The default <code>AdjustToolControllerOptionsBuilder</code> for <code>AdjustToolControllerOptions</code>.
SWIFT_CLASS_NAMED("AdjustToolControllerOptionsBuilder")
@interface PESDKAdjustToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure allows further configuration of the adjust tool buttons. The closure is called for
/// each adjust tool button and has the button and its corresponding adjust tool as parameters.
@property (nonatomic, copy) void (^ _Nullable adjustToolButtonConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull, enum AdjustTool);
/// This closure is called every time the user selects a tool.
@property (nonatomic, copy) void (^ _Nullable adjustToolSelectedClosure)(enum AdjustTool);
/// This closure can be used to configure the slider that is visible when selecting an adjust tool.
@property (nonatomic, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider and that is visible when selecting
/// an adjust tool.
@property (nonatomic, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the active <code>AdjustTool</code>
/// will be passed as parameters.
@property (nonatomic, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum AdjustTool);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class NSNumber;

@interface PESDKAdjustToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>AdjustTool</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedAdjustTools</code> with the corresponding <code>AdjustTool</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedAdjustToolsAsNSNumbers;
@end


/// Consumers of analytics screen views and events must implement this protocol. You can then forward
/// all screen views and events to an analytics service of your choice. To receive events you must
/// register your <code>AnalyticsClient</code> instance with <code>Analytics.addAnalyticsClient(_:)</code>.
SWIFT_PROTOCOL_NAMED("AnalyticsClient")
@protocol PESDKAnalyticsClient
/// This method is called when an analytics screen view occurs.
/// \param screenView The name of the screen view.
///
- (void)logScreenView:(PESDKAnalyticsScreenViewName _Nonnull)screenView;
/// This method is called when an analytics event occurs.
/// \param event The name of the event.
///
/// \param attributes The attributes associated with the event, if any.
///
- (void)logEvent:(PESDKAnalyticsEventName _Nonnull)event attributes:(NSDictionary<PESDKAnalyticsEventAttributeName, id> * _Nullable)attributes;
@end


/// A concrete implementation of <code>AnalyticsClient</code> that dispatches events to all registered
/// clients on a background queue.
SWIFT_CLASS_NAMED("Analytics")
@interface PESDKAnalytics : NSObject <PESDKAnalyticsClient>
/// Events are only dispatched if <code>isEnabled</code> is set to <code>true</code>. Defaults to <code>false</code>.
@property (nonatomic) BOOL isEnabled;
/// Register an instance which implements the <code>AnalyticsClient</code> protocol to receiving events.
/// \param client The client that should receive events.
///
- (void)addAnalyticsClient:(id <PESDKAnalyticsClient> _Nonnull)client;
/// Unregister an instance which implements the <code>AnalyticsClient</code> protocol from receiving events.
/// \param client The client that should stop receiving events.
///
- (void)removeAnalyticsClient:(id <PESDKAnalyticsClient> _Nonnull)client;
/// :nodoc:
- (void)logScreenView:(PESDKAnalyticsScreenViewName _Nonnull)screenView;
/// :nodoc:
- (void)logEvent:(PESDKAnalyticsEventName _Nonnull)event attributes:(NSDictionary<PESDKAnalyticsEventAttributeName, id> * _Nullable)attributes;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@class CAAnimation;

/// <code>AnimationDelegate</code> can be used as the delegate of a <code>CAAnimation</code> to easily specify a completion block.
SWIFT_CLASS_NAMED("AnimationDelegate")
@interface PESDKAnimationDelegate : NSObject <CAAnimationDelegate>
/// The block that should be executed after a <code>CAAnimation</code> finishes.
@property (nonatomic, readonly, copy) void (^ _Nonnull block)(BOOL);
/// :nodoc:
- (void)animationDidStop:(CAAnimation * _Nonnull)anim finished:(BOOL)flag;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

/// Represents the type of blend that should be used for several operations such as overlay.
typedef SWIFT_ENUM_NAMED(NSInteger, PESDKBlendMode, "BlendMode") {
/// Standard alpha blending should be used.
  PESDKBlendModeNormal = 0,
/// Overlay blending should be used.
  PESDKBlendModeOverlay = 1,
/// Soft-light blending should be used.
  PESDKBlendModeSoftLight = 2,
/// Hard-light blending should be used.
  PESDKBlendModeHardLight = 3,
/// Multiply blending should be used.
  PESDKBlendModeMultiply = 4,
/// Darken blending should be used.
  PESDKBlendModeDarken = 5,
/// Color-burn blending should be used.
  PESDKBlendModeColorBurn = 6,
/// Screen blending should be used.
  PESDKBlendModeScreen = 7,
/// Lighten blending should be used.
  PESDKBlendModeLighten = 8,
};

/// This is used to set the quality of the blur
typedef SWIFT_ENUM(NSInteger, BlurQuality) {
/// Low is used during preview.
  BlurQualityLow = 0,
/// High is used during export.
  BlurQualityHigh = 1,
};



/// This class represents a gradient control view. It is used within the focus tool to visualize
/// the chosen focus parameters.
SWIFT_CLASS_NAMED("FocusGradientView")
@interface PESDKFocusGradientView : UIControl
/// The center point between both control points.
@property (nonatomic, readonly) CGPoint centerPoint;
/// This value is used during the drag limit calculation, and should be set to the slider height.
@property (nonatomic) CGFloat sliderHeight;
/// The absolute fade width value. This value is between 0 and 100.
@property (nonatomic) CGFloat fadeWidth;
/// The normalized fade width.
@property (nonatomic, readonly) CGFloat normalizedFadeWidth;
/// The color of the gradient view.
@property (nonatomic, strong) UIColor * _Nonnull color;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// :nodoc:
- (void)accessibilityIncrement;
/// :nodoc:
- (void)accessibilityDecrement;
@end


/// This class represents a rectangle gradient control view. It is used within the focus tool to visualize
/// the chosen focus parameters.
SWIFT_CLASS_NAMED("BoxGradientView")
@interface PESDKBoxGradientView : PESDKFocusGradientView
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)drawRect:(CGRect)rect;
/// :nodoc:
- (void)layoutSubviews;
@end


/// A <code>Brush</code> holds all information needed to render a stroke.
SWIFT_CLASS_NAMED("Brush")
@interface PESDKBrush : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

@class PESDKStampGenerator;

/// The <code>GeneratorDelegate</code> protocol defines methods that allow you to respond to changes that are made to a generator.
SWIFT_PROTOCOL_NAMED("GeneratorDelegate")
@protocol PESDKGeneratorDelegate
/// Called when a generator changes any property.
/// \param generator The generator that was changed.
///
- (void)generatorDidChange:(PESDKStampGenerator * _Nonnull)generator;
@end


@interface PESDKBrush (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKGeneratorDelegate>
/// :nodoc:
- (void)generatorDidChange:(PESDKStampGenerator * _Nonnull)generator;
@end


/// A <code>ColorToolController</code> is reponsible for displaying the UI to adjust the color of an element
/// that has been added to an image.
SWIFT_CLASS_NAMED("ColorToolController")
@interface PESDKColorToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>BrushColorToolController</code> is reponsible for displaying the UI to adjust the color of the brush
/// that will be drawn on the image.
SWIFT_CLASS_NAMED("BrushColorToolController")
@interface PESDKBrushColorToolController : PESDKColorToolController
/// :nodoc:
- (void)loadView;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKBrushColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

@class PESDKColorPickerView;

@interface PESDKBrushColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)colorPicker:(PESDKColorPickerView * _Nonnull)colorPickerView didPickColor:(UIColor * _Nonnull)color;
@end


@interface PESDKBrushColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end

@class UIImage;

/// A <code>FrameImageView</code> is currently just a dummy class. Its purpose is to find out if we are dealing with the frame view
/// during serialization.
SWIFT_CLASS_NAMED("BrushImageView")
@interface PESDKBrushImageView : UIImageView
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image highlightedImage:(UIImage * _Nullable)highlightedImage OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(ios,introduced=3.0);
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

/// The overlay actions that can be used in an instance of <code>BrushToolControllerOptions</code>.
/// <ul>
///   <li>
///     undo:             Undo the latest stroke.
///   </li>
///   <li>
///     redo:             Redo the latest stroke.
///   </li>
///   <li>
///     delete:           Delete the drawing.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, BrushOverlayAction) {
/// Undo the latest stroke.
  BrushOverlayActionUndo = 0,
/// Redo the latest stroke.
  BrushOverlayActionRedo = 1,
/// Delete the drawing.
  BrushOverlayActionDelete = 2,
};

/// The tools that can be used in an instance of <code>BrushToolController</code>.
/// <ul>
///   <li>
///     color:           Change the color of the brush.
///   </li>
///   <li>
///     size:            Change the size of the brush.
///   </li>
///   <li>
///     hardness:        Change the hardness of the brush.
///   </li>
///   <li>
///     bringToFront:    Bring the drawing to the front.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, BrushTool) {
/// Change the color of the brush.
  BrushToolColor = 0,
/// Change the size of the brush.
  BrushToolSize = 1,
/// Change the hardness of the brush.
  BrushToolHardness = 2,
/// Bring the drawing to the front.
  BrushToolBringToFront = 3,
};


/// A <code>BrushToolController</code> is reponsible for displaying the UI to draw a painting on top of an image.
SWIFT_CLASS_NAMED("BrushToolController")
@interface PESDKBrushToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

@class UIGestureRecognizer;
@class UITouch;

@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldReceiveTouch:(UITouch * _Nonnull)touch SWIFT_WARN_UNUSED_RESULT;
@end

@class PESDKCanvasView;

/// The <code>CanvasViewDelegate</code> protocol defines methods that allow you to react to changes of the canvas view.
SWIFT_PROTOCOL_NAMED("CanvasViewDelegate")
@protocol PESDKCanvasViewDelegate
/// Called when a redraw is requested.
/// \param canvasView The canvas view requesting the redraw.
///
- (void)canvasViewDidRequestRedraw:(PESDKCanvasView * _Nonnull)canvasView;
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKCanvasViewDelegate>
/// :nodoc:
- (void)canvasViewDidRequestRedraw:(PESDKCanvasView * _Nonnull)canvasView;
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

enum PESDKOrientation : NSInteger;

/// The <code>CanvasViewDataSource</code> protocol defines methods that allow you to pass needed information to the canvas view.
SWIFT_PROTOCOL_NAMED("CanvasViewDataSource")
@protocol PESDKCanvasViewDataSource
/// Called to ask for the normalized crop rect that is currently applied to the image.
/// \param canvasView The canvas view that is requesting this information.
///
///
/// returns:
/// The normalized crop rect.
- (CGRect)canvasViewNormalizedCropRect:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// Called to ask for the image orientation that is currently applied to the image.
/// \param canvasView The canvas view that is requesting this information.
///
///
/// returns:
/// The applied image orienation.
- (enum PESDKOrientation)canvasViewAppliedOrientation:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// Called to ask for the straighten angle that is currently applied to the image.
/// \param canvasView The canvas view that is requesting this information.
///
///
/// returns:
/// The applied straighten angle.
- (CGFloat)canvasViewStraightenAngle:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// Called to ask for the image insets that are currently applied to the image.
/// \param canvasView The canvas view that is requesting this information.
///
///
/// returns:
/// The applied image insets.
- (UIEdgeInsets)canvasViewImageInsets:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// Called to ask for the size of the output image.
/// \param canvasView The canvas view that is requesting this information.
///
///
/// returns:
/// The output image size.
- (CGSize)canvasViewOutputImageSize:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKCanvasViewDataSource>
/// :nodoc:
- (CGRect)canvasViewNormalizedCropRect:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (enum PESDKOrientation)canvasViewAppliedOrientation:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (CGFloat)canvasViewStraightenAngle:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UIEdgeInsets)canvasViewImageInsets:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (CGSize)canvasViewOutputImageSize:(PESDKCanvasView * _Nonnull)canvasView SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKBrushToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didDeselectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// This method starts a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
- (void)beginPathWithLocation:(CGPoint)location;
/// This method continues a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
- (void)continuePathWithLocation:(CGPoint)location;
/// This method ends a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
- (void)endPathWithLocation:(CGPoint)location;
@end

@class PESDKOverlayButton;
@class PESDKBrushToolControllerOptionsBuilder;

/// Options for configuring an <code>BrushToolController</code>.
SWIFT_CLASS_NAMED("BrushToolControllerOptions")
@interface PESDKBrushToolControllerOptions : PESDKToolControllerOptions
/// This closure allows further configuration of the brush tool buttons. The closure is called for
/// each brush tool button and has the button and its corresponding brush tool as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable brushToolButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum BrushTool);
/// This closure is called every time the user selects a tool.
@property (nonatomic, readonly, copy) void (^ _Nullable brushToolSelectedClosure)(enum BrushTool);
/// This closure can be used to configure the slider that is visible when selecting a brush tool.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider and that is visible when selecting
/// a brush tool.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the active <code>BrushTool</code>
/// will be passed as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum BrushTool);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum BrushOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable brushActionSelectedClosure)(enum BrushOverlayAction);
/// The minimum size that a brush can have in pixels.
@property (nonatomic, readonly) CGFloat minimumBrushSize;
/// The maximum size that a brush can have in pixels.
@property (nonatomic, readonly) CGFloat maximumBrushSize;
/// The default size that a brush has in pixels
@property (nonatomic, readonly) CGFloat defaultBrushSize;
/// The minimum hardness factor a brush can have.
@property (nonatomic, readonly) CGFloat minimumBrushHardness;
/// The maximum hardness factor a brush can have.
@property (nonatomic, readonly) CGFloat maximumBrushHardness;
/// The default hardness factor a brush has.
@property (nonatomic, readonly) CGFloat defaultBrushHardness;
/// The default color a brush has.
@property (nonatomic, readonly, strong) UIColor * _Nonnull defaultBrushColor;
/// <code>false</code> if the opacity of the brush should vary by the size of the brush, <code>true</code> otherwise.
/// Default is <code>false</code>.
@property (nonatomic, readonly) BOOL usesUniformHardness;
/// Returns a newly allocated instance of <code>BrushToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of <code>BrushToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of <code>BrushToolControllerOptions</code> using the given builder.
/// \param builder A <code>BrushToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of <code>BrushToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKBrushToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>BrushToolControllerOptionsBuilder</code> for <code>BrushToolControllerOptions</code>.
SWIFT_CLASS_NAMED("BrushToolControllerOptionsBuilder")
@interface PESDKBrushToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure allows further configuration of the brush tool buttons. The closure is called for
/// each brush tool button and has the button and its corresponding brush tool as parameters.
@property (nonatomic, copy) void (^ _Nullable brushToolButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum BrushTool);
/// This closure is called every time the user selects a tool.
@property (nonatomic, copy) void (^ _Nullable brushToolSelectedClosure)(enum BrushTool);
/// This closure can be used to configure the slider that is visible when selecting a brush tool.
@property (nonatomic, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider and that is visible when selecting
/// a brush tool.
@property (nonatomic, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the active <code>BrushTool</code>
/// will be passed as parameters.
@property (nonatomic, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum BrushTool);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum BrushOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, copy) void (^ _Nullable brushActionSelectedClosure)(enum BrushOverlayAction);
/// The minimum size that a brush can have in pixels.
@property (nonatomic) CGFloat minimumBrushSize;
/// The maximum size that a brush can have in pixels.
@property (nonatomic) CGFloat maximumBrushSize;
/// The default size that a brush has in pixels
@property (nonatomic) CGFloat defaultBrushSize;
/// The minimum hardness factor a brush can have.
@property (nonatomic) CGFloat minimumBrushHardness;
/// The maximum hardness factor a brush can have.
@property (nonatomic) CGFloat maximumBrushHardness;
/// The default hardness factor a brush has.
@property (nonatomic) CGFloat defaultBrushHardness;
/// The default color a brush has.
@property (nonatomic, strong) UIColor * _Nonnull defaultBrushColor;
/// <code>false</code> if the hardness of the brush should vary by the size of the brush, <code>true</code> otherwise.
/// Default is <code>false</code>.
@property (nonatomic) BOOL usesUniformHardness;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKBrushToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>BrushTool</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedBrushTools</code> with the corresponding <code>BrushTool</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedBrushToolsAsNSNumbers;
/// An array of <code>BrushOverlayAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedBrushOverlayActions</code> with the corresponding <code>BrushOverlayAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedBrushOverlayActionsAsNSNumbers;
@end


@interface NSBundle (SWIFT_EXTENSION(PhotoEditorSDK))
/// The bundle that contains all assets of the PhotoEditor SDK.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull pesdkBundle;)
+ (NSBundle * _Nonnull)pesdkBundle SWIFT_WARN_UNUSED_RESULT;
@end

@class UIEvent;

/// A <code>Button</code> is a subclass of <code>UIButton</code>, which supports running a closure for a given control event
/// and has the ability to specify a touch area inset.
SWIFT_CLASS_NAMED("Button")
@interface PESDKButton : UIButton
/// Associates a closure with the control.
/// \param actionClosure The closure to associate with the control.
///
/// \param controlEvents The control-specific events for which the closure is called.
///
- (void)setActionClosure:(void (^ _Nullable)(id _Nonnull))actionClosure for:(UIControlEvents)controlEvents;
/// Associates a closure with the control for the <code>.touchUpInside</code> control event.
@property (nonatomic, copy) void (^ _Nullable actionClosure)(id _Nonnull);
/// The insets to add to the touch target.
@property (nonatomic) UIEdgeInsets touchAreaInsets;
/// :nodoc:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)tintColorDidChange;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface CLLocation (SWIFT_EXTENSION(PhotoEditorSDK))
@end

@class GLKView;
enum RecordingMode : NSInteger;
@class NSError;
@class AVAssetWriter;
@class PESDKPhotoEffect;

/// The <code>CameraController</code> class provides functions for serveral camera related tasks,
/// including setup, flash control, and such.
SWIFT_CLASS_NAMED("CameraController")
@interface PESDKCameraController : NSObject
/// An instance of a <code>GLKView</code> that is used to present the preview.
@property (nonatomic, readonly, strong) GLKView * _Nonnull videoPreviewView;
/// The currently active recording mode (i.e. <code>.Photo</code> or <code>.Video</code>). Setting this property before
/// calling <code>setupWithInitialRecordingMode(:)</code> is ignored. The setter asynchronously updates the
/// session, so the getter might not immediately represent the new value. You can observe changes
/// to the value of this property using key-value observing.
@property (nonatomic) enum RecordingMode recordingMode;
/// Called when the <code>running</code> state of the camera changes.
@property (nonatomic, copy) void (^ _Nullable runningStateChangedHandler)(BOOL);
/// Called when the camera position changes.
@property (nonatomic, copy) void (^ _Nullable cameraPositionChangedHandler)(AVCaptureDevicePosition, AVCaptureDevicePosition);
/// Called when the list of available camera positions was changed.
@property (nonatomic, copy) void (^ _Nullable availableCameraPositionsChangedHandler)(void);
/// Called when any aspect of the flash changes.
/// <code>hasFlash</code> is <code>true</code> if the current camera has a flash. <code>flashMode</code> represents the currently
/// active flash mode. <code>flashAvailable</code> is <code>true</code> if the flash is available for use.
@property (nonatomic, copy) void (^ _Nullable flashChangedHandler)(BOOL, AVCaptureFlashMode, BOOL);
/// Called when any aspect of the torch changes.
/// <code>hasTorch</code> is <code>true</code> if the current camera has a torch. <code>torchMMode</code> represents the currently
/// active torch mode. <code>torchAvailable</code> is <code>true</code> if the torch is available for use.
@property (nonatomic, copy) void (^ _Nullable torchChangedHandler)(BOOL, AVCaptureTorchMode, BOOL);
/// Called when a photo is currently being captured or done being captured.
@property (nonatomic, copy) void (^ _Nullable capturingStillImageHandler)(BOOL);
/// Called when the session is interrupted or the interruption ended. This can happen when
/// switching to a multi-app layout, introduced in iOS 9 for example.
@property (nonatomic, copy) void (^ _Nullable sessionInterruptionHandler)(BOOL);
/// Called when a runtime error occurs.
@property (nonatomic, copy) void (^ _Nullable sessionRuntimeErrorHandler)(NSError * _Nonnull);
/// Called when the user did not grant authorization for the camera.
@property (nonatomic, copy) void (^ _Nullable authorizationFailedHandler)(void);
/// Called when video recording starts.
@property (nonatomic, copy) void (^ _Nullable videoRecordingStartedHandler)(void);
/// Called when video recording finishes.
@property (nonatomic, copy) void (^ _Nullable videoRecordingFinishedHandler)(NSURL * _Nonnull);
/// Called when video recording fails.
@property (nonatomic, copy) void (^ _Nullable videoRecordingFailedHandler)(void);
/// Called each second while a video recording is in progress.
@property (nonatomic, copy) void (^ _Nullable videoRecordingProgressHandler)(NSInteger);
/// Called when the size of the preview image within the <code>videoPreviewView</code> changes
@property (nonatomic, copy) void (^ _Nullable previewFrameChangedHandler)(CGRect);
/// Called when the focus point changes.
@property (nonatomic, copy) void (^ _Nullable focusPointChangedHandler)(CGPoint);
/// Called when the focus mode changes.
@property (nonatomic, copy) void (^ _Nullable focusModeChangedHandler)(AVCaptureFocusMode, AVCaptureExposureMode);
/// Called when the focus gets disabled.
@property (nonatomic, copy) void (^ _Nullable focusDisabledHandler)(void);
/// The video output settings to use for video recording. If <code>nil</code>, the recommended video
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable videoOutputSettings;
/// The video output settings to use for video recording. If <code>nil</code>, the recommended audio
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable audioOutputSettings;
/// The file type to use for video recording. Default is <code>AVFileTypeQuickTimeMovie</code>.
/// note:
/// If you change this, you will most likely also want to change <code>videoOutputSettings</code>
/// and <code>audioOutputSettings</code>.
@property (nonatomic, copy) NSString * _Nonnull videoRecordingFileType;
/// The extension to use for video files. Default is “mov”.
@property (nonatomic, copy) NSString * _Nonnull videoRecordingFileExtension;
/// Use this closure to further configure the asset writer that is created for video recording.
@property (nonatomic, copy) void (^ _Nullable assetWriterConfigurationClosure)(AVAssetWriter * _Nonnull);
/// Set to <code>false</code> to disable locking focus when a user taps on the live preview. Default is <code>true</code>.
@property (nonatomic) BOOL tapToFocusEnabled;
/// The effect filter that is applied to the live feed.
@property (nonatomic, strong) PESDKPhotoEffect * _Nullable photoEffect;
/// The intensity of the filter that is applied to the live feed.
@property (nonatomic) CGFloat photoEffectIntensity;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Initializes the camera. This method <em>must</em> be called before calling <code>startCamera()</code>.
/// Any handlers that will be used should be set before calling this method, so that they are called
/// with their initial values.
/// \param recordingMode The initial recording mode (e.g. <code>.Photo</code> or <code>.Video</code>) to use when
/// initializing the camera.
///
///
/// throws:
/// A <code>CameraControllerError</code> or an <code>NSError</code> if setup fails.
- (BOOL)setupWithInitialRecordingMode:(enum RecordingMode)recordingMode error:(NSError * _Nullable * _Nullable)error;
/// Same as <code>setupWithInitialRecordingMode(:)</code> but with an optional completion handler. The completion handler is always invoked
/// on the main thread.
/// \param recordingMode The initial recording mode (e.g. <code>.Photo</code> or <code>.Video</code>) to use when
/// initializing the camera.
///
/// \param completion A block to be executed when the camera has finished initialization.
///
///
/// throws:
/// A <code>CameraControllerError</code> or an <code>NSError</code> if setup fails.
- (BOOL)setupWithInitialRecordingMode:(enum RecordingMode)recordingMode completion:(void (^ _Nullable)(void))completion error:(NSError * _Nullable * _Nullable)error;
/// Starts the camera. <code>setupWithInitialRecordingMode(:)</code> <em>must</em> be called before calling this method, otherwise this method does
/// nothing. You should also add the <code>videoPreviewView</code> to your view hierachy to see the camera output.
- (void)startCamera;
/// Stops the camera.
- (void)stopCamera;
/// Switches the camera to the other position (e.g. <code>.Back</code> -> <code>.Front</code> and <code>.Front</code> -> <code>.Back</code>)
- (void)toggleCameraPosition;
/// Switches the camera to the desired position (if available).
/// \param position The position to switch to.
///
- (void)switchToCameraAtPosition:(AVCaptureDevicePosition)position;
/// Takes a photo and hands it over to the completion block. The completion block always runs on the main
/// thread. This method loses the image’s metadata.
/// \param completion A completion block that has an image and an error as parameters.
/// If the image was taken sucessfully the error is nil.
///
- (void)takePhoto:(void (^ _Nonnull)(UIImage * _Nullable, NSError * _Nullable))completion;
/// Takes a photo and hands it over to the completion block. The completion block always runs on
/// the main thread. Use this method to preserve the image’s metadata.
/// \param completion A completion block that has data and an error as parameters.
/// If the image was taken successfully the error is <code>nil</code>.
///
- (void)takePhotoAndReturnData:(void (^ _Nonnull)(NSData * _Nullable, NSError * _Nullable))completion;
/// Starts the video recording. This only works if <code>recordingMode</code> is set to .Video. You should
/// set appropriate blocks for <code>videoRecordingStartedHandler</code>, <code>videoRecordingFailedHandler</code>,
/// <code>videoRecordingFinishedHandler</code> and <code>videoRecordingProgressHandler</code>. The finished handler gets
/// passed a <code>NSURL</code> to the path of the recorded video file. Please note that you are responsible
/// for deleting that file when you no longer need it.
- (void)startVideoRecording;
/// Stops video recording. This only works if you previously started video recording.
- (void)stopVideoRecording;
/// Selects the next light mode. The order is taken from <code>flashModes</code> or <code>torchModes</code> depending on which is active.
/// If the current device does not support a light mode, the next light mode that is supported is used or <code>.Off</code>.
- (void)selectNextLightMode;
/// Zooms the camera by the desired zoom factor.
/// \param zoomFactor The factor to zoom by.
///
- (void)zoomWithDesiredZoomFactor:(CGFloat)zoomFactor;
/// :nodoc:
- (void)observeValueForKeyPath:(NSString * _Nullable)keyPath ofObject:(id _Nullable)object change:(NSDictionary<NSKeyValueChangeKey, id> * _Nullable)change context:(void * _Nullable)context;
@end

@class CLLocationManager;

@interface PESDKCameraController (SWIFT_EXTENSION(PhotoEditorSDK)) <CLLocationManagerDelegate>
/// :nodoc:
- (void)locationManager:(CLLocationManager * _Nonnull)manager didUpdateLocations:(NSArray<CLLocation *> * _Nonnull)locations;
@end


@interface PESDKCameraController (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>AVCaptureDevicePosition</code> raw values wrapped in <code>NSNumber</code>s.
/// Setting this property overrides any previously set values in
/// <code>cameraPositions</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull cameraPositionsAsNSNumbers;
/// An array of <code>AVCaptureFlashMode</code> raw values wrapped in <code>NSNumber</code>s.
/// Setting this property overrides any previously set values in
/// <code>flashModes</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull flashModesAsNSNumbers;
/// An array of <code>AVCaptureTorchMode</code> raw values wrapped in <code>NSNumber</code>s.
/// Setting this property overrides any previously set values in
/// <code>torchModes</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull torchModesAsNSNumbers;
@end

/// This enum holds types of errors that occur while using the <code>CameraController</code>.
/// <ul>
///   <li>
///     MultipleCallsToSetup:            Indicates that setup is called multiple times.
///   </li>
///   <li>
///     UnableToInitializeCaptureDevice: Indicates that the capture device can’t be initialized.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, CameraControllerError) {
/// Indicates that setup is called multiple times.
  CameraControllerErrorMultipleCallsToSetup = 0,
/// Indicates that the capture device can’t be initialized.
  CameraControllerErrorUnableToInitializeCaptureDevice = 1,
};
static NSString * _Nonnull const CameraControllerErrorDomain = @"PhotoEditorSDK.CameraControllerError";

@class UILabel;
@class UISwipeGestureRecognizer;
@class UIPinchGestureRecognizer;
@class PESDKFilterSelectionController;
@class VideoRecordButton;

/// The <code>CameraViewController</code> class provides a dialog to perform serveral tasks regarding the camera.
/// These include taking photos, switching on the flash, and such.
SWIFT_CLASS_NAMED("CameraViewController")
@interface PESDKCameraViewController : UIViewController
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Initializes a camera view controller using the given parameters.
/// <em>Discussion</em>
/// If you use the standard <code>init</code> method or <code>initWithCoder</code> to initialize a <code>CameraViewController</code> object, a camera view controller with all supported recording modes and the default configuration is created.
/// \param configuration An <code>Configuration</code> object.
///
///
/// returns:
/// And initialized <code>CameraViewController</code>.
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// The view that contains the background views.
@property (nonatomic, readonly, strong) UIView * _Nonnull backgroundContainerView;
/// The view that contains all view positioned at the top of the screen.
@property (nonatomic, readonly, strong) UIView * _Nonnull topControlsView;
/// The view that serves as container for the actual preview.
@property (nonatomic, readonly, strong) UIView * _Nonnull cameraPreviewContainer;
/// The view that contains all view positioned at the bottom of the screen.
@property (nonatomic, readonly, strong) UIView * _Nonnull bottomControlsView;
/// The view that contains actions button that is used to initiate the photo capturing process.
@property (nonatomic, readonly, strong) UIView * _Nonnull actionButtonContainer;
/// The label that is used to display the current recording time.
@property (nonatomic, readonly, strong) UILabel * _Nonnull recordingTimeLabel;
/// The button that is used to initiate the photo capturing process.
@property (nonatomic, readonly, strong) UIControl * _Nullable actionButton;
/// The view that is used to select the current filter that is applied to the preview.
@property (nonatomic, readonly, strong) PESDKButton * _Nonnull filterSelectionButton;
/// The slider that is used to control the inensity of the previewed filter.
@property (nonatomic, readonly, strong) PESDKSlider * _Nonnull filterIntensitySlider;
/// The recognizer that detects a swipe gesture to the right.
@property (nonatomic, readonly, strong) UISwipeGestureRecognizer * _Nonnull swipeRightGestureRecognizer;
/// The recognizer that detects a swipe gesture to the left.
@property (nonatomic, readonly, strong) UISwipeGestureRecognizer * _Nonnull swipeLeftGestureRecognizer;
/// The recognizer that detects a pinch gesture.
@property (nonatomic, readonly, strong) UIPinchGestureRecognizer * _Nonnull pinchGestureRecognizer;
/// The instance of a <code>FilterSelectionController</code> that is used to select the current preview filter.
@property (nonatomic, readonly, strong) PESDKFilterSelectionController * _Nonnull filterSelectionController;
/// The camera controller that is used by the controller.
@property (nonatomic, readonly, strong) PESDKCameraController * _Nullable cameraController;
/// The block that is called once the capture process has finished.
@property (nonatomic, copy) void (^ _Nullable completionBlock)(UIImage * _Nullable, NSURL * _Nullable);
/// The block that is called once a photo has been taken. It is passed a Data instance, containing
/// a JPEG image with metadata. The <code>UIImage</code> passed to <code>completionBlock</code> does not contain any
/// metadata. If this is set, then <code>completionBlock</code> won’t be called.
@property (nonatomic, copy) void (^ _Nullable dataCompletionBlock)(NSData * _Nullable);
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
@property (nonatomic, readonly) BOOL shouldAutomaticallyForwardAppearanceMethods;
/// :nodoc:
@property (nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle;
/// :nodoc:
@property (nonatomic, readonly) BOOL prefersStatusBarHidden;
/// :nodoc:
@property (nonatomic, readonly) BOOL shouldAutorotate;
/// :nodoc:
@property (nonatomic, readonly) UIInterfaceOrientation preferredInterfaceOrientationForPresentation;
/// This function gets the most recent image form the camera roll, and sets it as preview image for the according button.
- (void)setLastImageFromRollAsPreview;
/// Takes a photo.
/// \param sender The object that initiated the request.
///
- (void)takePhoto:(PESDKButton * _Nullable)sender;
/// Toggles video recording.
/// \param sender Sender of the event.
///
- (void)recordVideo:(VideoRecordButton * _Nullable)sender;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
@end


@interface PESDKCameraViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldReceiveTouch:(UITouch * _Nonnull)touch SWIFT_WARN_UNUSED_RESULT;
@end

@class UIImagePickerController;

@interface PESDKCameraViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
/// :nodoc:
- (void)imagePickerController:(UIImagePickerController * _Nonnull)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> * _Nonnull)info;
/// :nodoc:
- (void)imagePickerControllerDidCancel:(UIImagePickerController * _Nonnull)picker;
@end

@class PESDKPhotoEditViewController;

/// The <code>PhotoEditViewControllerDelegate</code> protocol defines methods that allow you to respond to the events of an instance of <code>PhotoEditViewController</code>.
SWIFT_PROTOCOL_NAMED("PhotoEditViewControllerDelegate")
@protocol PESDKPhotoEditViewControllerDelegate
/// Called when the output image was generated.
/// \param photoEditViewController The photo edit view controller that created the output image.
///
/// \param image The output image that was generated.
///
/// \param data The output image that was generated, as NSData. This will contain all the exif-data of the input image.
///
- (void)photoEditViewController:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController didSaveImage:(UIImage * _Nonnull)image imageAsData:(NSData * _Nonnull)data;
/// Called when the output image could not be generated.
/// \param photoEditViewController The photo edit view controller that was unable to generate the output image.
///
- (void)photoEditViewControllerDidFailToGeneratePhoto:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController;
/// Called when the user wants to dismiss the editor.
/// \param photoEditViewController The photo edit view controller that is asking to be cancelled.
///
- (void)photoEditViewControllerDidCancel:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController;
@end


@interface PESDKCameraViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKPhotoEditViewControllerDelegate>
/// :nodoc:
- (void)photoEditViewControllerDidCancel:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController;
/// :nodoc:
- (void)photoEditViewControllerDidFailToGeneratePhoto:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController;
/// :nodoc:
- (void)photoEditViewController:(PESDKPhotoEditViewController * _Nonnull)photoEditViewController didSaveImage:(UIImage * _Nonnull)image imageAsData:(NSData * _Nonnull)data;
@end


/// Options for configuring a <code>CameraViewController</code>.
SWIFT_CLASS_NAMED("CameraViewControllerOptions")
@interface PESDKCameraViewControllerOptions : NSObject
/// The views background color. In video mode the colors alpha value is reduced to 0.3.
/// Defaults to the global background color.
@property (nonatomic, readonly, strong) UIColor * _Nullable backgroundColor;
/// Use this closure to configure the flash button.
@property (nonatomic, readonly, copy) void (^ _Nullable flashButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the switch camera button.
@property (nonatomic, readonly, copy) void (^ _Nullable switchCameraButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the camera roll button.
@property (nonatomic, readonly, copy) void (^ _Nullable cameraRollButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the action button in photo mode.
@property (nonatomic, readonly, copy) void (^ _Nullable photoActionButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the filter selector button.
@property (nonatomic, readonly, copy) void (^ _Nullable filterSelectorButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the timelabel.
@property (nonatomic, readonly, copy) void (^ _Nullable timeLabelConfigurationClosure)(UILabel * _Nonnull);
/// Use this closure to configure the filter intensity slider.
@property (nonatomic, readonly, copy) void (^ _Nullable filterIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// Use this closure to configure the given recording mode button. By default the buttons
/// light up in yellow, when selected.
@property (nonatomic, readonly, copy) void (^ _Nullable recordingModeButtonConfigurationClosure)(PESDKButton * _Nonnull, enum RecordingMode);
/// Enable/Disable permanent crop to square. Disabled by default.
@property (nonatomic, readonly) BOOL cropToSquare;
/// The maximum length of a video. If set to 0 the length is unlimited.
@property (nonatomic, readonly) NSInteger maximumVideoLength;
/// Enable/Disable tap to focus on the camera preview image. Enabled by default.
@property (nonatomic, readonly) BOOL tapToFocusEnabled;
/// Show/Hide the camera roll button. Enabled by default.
@property (nonatomic, readonly) BOOL showCameraRoll;
/// Enable/Disable filter bottom drawer. Enabled by default.
@property (nonatomic, readonly) BOOL showFilters;
/// Enable/Disable filter intensity slider.
@property (nonatomic, readonly) BOOL showFilterIntensitySlider;
/// The initial intensity of the filters.
@property (nonatomic, readonly) CGFloat initialFilterIntensity;
/// The video output settings to use for video recording. If <code>nil</code>, the recommended video
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nullable videoOutputSettings;
/// The video output settings to use for video recording. If <code>nil</code>, the recommended audio
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nullable audioOutputSettings;
/// The file type to use for video recording. Default is <code>AVFileTypeQuickTimeMovie</code>.
/// note:
/// If you change this, you will most likely also want to change <code>videoOutputSettings</code>
/// and <code>audioOutputSettings</code>.
@property (nonatomic, readonly, copy) NSString * _Nonnull videoRecordingFileType;
/// The extension to use for video files. Default is “mov”.
@property (nonatomic, readonly, copy) NSString * _Nonnull videoRecordingFileExtension;
/// Use this closure to further configure the asset writer that is created for video recording.
@property (nonatomic, readonly, copy) void (^ _Nullable assetWriterConfigurationClosure)(AVAssetWriter * _Nonnull);
/// Returns a newly allocated instance of a <code>CameraViewControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>CameraViewControllerOptions</code>.
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// The default <code>CameraViewControllerOptionsBuilder</code> for <code>CameraViewControllerOptions</code>.
SWIFT_CLASS_NAMED("CameraViewControllerOptionsBuilder")
@interface PESDKCameraViewControllerOptionsBuilder : NSObject
/// The views background color. In video mode the colors alpha value is reduced to 0.3.
/// Defaults to the global background color.
@property (nonatomic, strong) UIColor * _Nullable backgroundColor;
/// Use this closure to configure the flash button. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable flashButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the switch camera button. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable switchCameraButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the camera roll button. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable cameraRollButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the action button in photo mode. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable photoActionButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the filter selector button. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable filterSelectorButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Use this closure to configure the timelabel. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable timeLabelConfigurationClosure)(UILabel * _Nonnull);
/// Use this closure to configure the filter intensity slider. Defaults to an empty implementation.
@property (nonatomic, copy) void (^ _Nullable filterIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// Use this closure to configure the given recording mode button. By default the buttons
/// light up in yellow, when selected.
@property (nonatomic, copy) void (^ _Nullable recordingModeButtonConfigurationClosure)(PESDKButton * _Nonnull, enum RecordingMode);
/// Enable/Disable permanent crop to square. Disabled by default.
@property (nonatomic) BOOL cropToSquare;
/// The maximum length of a video. If set to 0 the length is unlimited.
@property (nonatomic) NSInteger maximumVideoLength;
/// Enable/Disable tap to focus on the camera preview image. Enabled by default.
@property (nonatomic) BOOL tapToFocusEnabled;
/// Show/Hide the camera roll button. Enabled by default.
@property (nonatomic) BOOL showCameraRoll;
/// Enable/Disable filter bottom drawer. Enabled by default.
@property (nonatomic) BOOL showFilters;
/// Enable/Disable filter intensity slider.
@property (nonatomic) BOOL showFilterIntensitySlider;
/// The initial intensity of the filters.
@property (nonatomic) CGFloat initialFilterIntensity;
/// The video output settings to use for video recording. If <code>nil</code>, the recommended video
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable videoOutputSettings;
/// The video output settings to use for video recording. If <code>nil</code>, the recommended audio
/// settings for file type <code>AVFileTypeQuickTimeMovie</code> will be used.
@property (nonatomic, copy) NSDictionary<NSString *, id> * _Nullable audioOutputSettings;
/// The file type to use for video recording. Default is <code>AVFileTypeQuickTimeMovie</code>.
/// note:
/// If you change this, you will most likely also want to change <code>videoOutputSettings</code>
/// and <code>audioOutputSettings</code>.
@property (nonatomic, copy) NSString * _Nonnull videoRecordingFileType;
/// The extension to use for video files. Default is “mov”.
@property (nonatomic, copy) NSString * _Nonnull videoRecordingFileExtension;
/// Use this closure to further configure the asset writer that is created for video recording.
@property (nonatomic, copy) void (^ _Nullable assetWriterConfigurationClosure)(AVAssetWriter * _Nonnull);
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKCameraViewControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>AVCaptureDevicePosition</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedCameraPositions</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedCameraPositionsAsNSNumbers;
/// An array of <code>AVCaptureFlashMode</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedFlashModes</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedFlashModesAsNSNumbers;
/// An array of <code>AVCaptureTorchMode</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedFlashModes</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedTorchModesAsNSNumbers;
/// An array of <code>RecordingMode</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedRecordingModes</code> with the corresponding unwrapped values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedRecordingModesAsNSNumbers;
@end

@class PESDKPainting;
@class PESDKTool;
@class EAGLContext;

/// The <code>CanvasView</code> is responsible for presenting a painting and handling touch events related to paintings.
SWIFT_CLASS_NAMED("CanvasView")
@interface PESDKCanvasView : GLKView
/// The painting that is managed by this canvas view.
@property (nonatomic, readonly, strong) PESDKPainting * _Nonnull painting;
/// The tool that is currently active. Currently only an instance of <code>FreehandTool</code> is supported.
@property (nonatomic, strong) PESDKTool * _Nonnull activeTool;
/// The object that acts as the data source for the canvas view.
@property (nonatomic, weak) id <PESDKCanvasViewDataSource> _Nullable dataSource;
/// The object that acts as the delegate for the canvas view.
@property (nonatomic, weak) id <PESDKCanvasViewDelegate> _Nullable canvasDelegate;
/// <code>true</code> if a user is currently painting, <code>false</code> otherwise.
@property (nonatomic, readonly) BOOL currentlyPainting;
/// Returns a newly initialized canvas view for the given painting, with the given tool and the given frame.
/// \param painting The painting that is managed by this canvas view.
///
/// \param activeTool The tool that should be used for the painting. Currently only an instance of <code>FreehandTool</code> is supported.
///
/// \param frame The frame of the view.
///
///
/// returns:
/// A newly initialized <code>CanvasView</code> object.
- (nonnull instancetype)initWithPainting:(PESDKPainting * _Nonnull)painting activeTool:(PESDKTool * _Nonnull)activeTool frame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// Converts a given point from view coordinates to painting coordinates.
/// \param pt The point that should be converted.
///
///
/// returns:
/// The converted point.
- (CGPoint)convertPointToDocument:(CGPoint)pt SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
@end




/// This class represents a circle gradient control view. It is used within the focus tool to visualize
/// the chosen focus parameters.
SWIFT_CLASS_NAMED("CircleGradientView")
@interface PESDKCircleGradientView : PESDKFocusGradientView
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)drawRect:(CGRect)rect;
/// :nodoc:
- (void)layoutSubviews;
@end

@class CIImage;

/// This filter adds or takes away clarity of an image.
SWIFT_CLASS_NAMED("ClarityFilter")
@interface PESDKClarityFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The intensity of this filter.
@property (nonatomic, strong) NSNumber * _Nullable inputIntensity;
/// The filtered image.
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>ColorCollectionViewCell</code> is a cell that shows a solid color and an image view on top of that color when the cell
/// is selected. It also has a <code>selectionIndicator</code> to show whether or not the cell is currently selected.
SWIFT_CLASS_NAMED("ColorCollectionViewCell")
@interface PESDKColorCollectionViewCell : UICollectionViewCell
/// A view that represents a solid color.
@property (nonatomic, readonly, strong) UIView * _Nonnull colorView;
/// An image view that is above the solid color and only visible when the cell is selected.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// The <code>ColorPickerView</code> provides a way to pick colors.
/// It contains three elements - a hue picker, a brightness and saturation picker and an alpha
/// picker. It has full support for wide colors.
SWIFT_CLASS_NAMED("ColorPickerView")
@interface PESDKColorPickerView : UIControl
/// The currently selected color
@property (nonatomic, strong) UIColor * _Nonnull color;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end



@interface PESDKColorToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKColorToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)colorPicker:(PESDKColorPickerView * _Nonnull)colorPickerView didPickColor:(UIColor * _Nonnull)color;
@end


@interface PESDKColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKColorToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

@class PESDKColorToolControllerOptionsBuilder;

/// Options for configuring a <code>ColorToolController</code>.
SWIFT_CLASS_NAMED("ColorToolControllerOptions")
@interface PESDKColorToolControllerOptions : PESDKToolControllerOptions
/// A list of colors that is available in the color dialog. This property is optional.
@property (nonatomic, readonly, copy) NSArray<UIColor *> * _Nullable availableColors;
/// A list of color-names that is available in the color dialog. This property is optional.
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nullable availableColorNames;
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding color and color name as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable colorActionButtonConfigurationClosure)(PESDKColorCollectionViewCell * _Nonnull, UIColor * _Nonnull, NSString * _Nonnull);
/// This closure is called every time the user selects an action
@property (nonatomic, readonly, copy) void (^ _Nullable colorActionSelectedClosure)(UIColor * _Nonnull, NSString * _Nonnull);
/// Creates a newly allocated instance of <code>ColorToolControllerOptions</code> using the default builder.
- (nonnull instancetype)init;
/// Creates a newly allocated instance of <code>ColorToolControllerOptions</code> using the given builder.
/// \param builder A <code>ColorToolControllerOptions</code> instance.
///
- (nonnull instancetype)initWithBuilder:(PESDKColorToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>ColorToolControllerOptionsBuilder</code> for <code>ColorToolControllerOptions</code>.
SWIFT_CLASS_NAMED("ColorToolControllerOptionsBuilder")
@interface PESDKColorToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// A list of colors that is available in the color dialog. This property is optional.
@property (nonatomic, copy) NSArray<UIColor *> * _Nullable availableColors;
/// A list of color-names that is available in the color dialog. This property is optional.
@property (nonatomic, copy) NSArray<NSString *> * _Nullable availableColorNames;
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding color and color name as parameters.
@property (nonatomic, copy) void (^ _Nullable colorActionButtonConfigurationClosure)(PESDKColorCollectionViewCell * _Nonnull, UIColor * _Nonnull, NSString * _Nonnull);
/// This closure is called every time the user selects an action
@property (nonatomic, copy) void (^ _Nullable colorActionSelectedClosure)(UIColor * _Nonnull, NSString * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// This filter is used to colorize stickers.
SWIFT_CLASS_NAMED("ColorizeFilter")
@interface PESDKColorizeFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The intensity of this filter.
@property (nonatomic, strong) UIColor * _Nullable inputColor;
/// The filtered image.
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKPhotoEditViewControllerOptions;
@class PESDKFilterToolControllerOptions;
@class PESDKOverlayToolControllerOptions;
@class PESDKStickerToolControllerOptions;
@class PESDKStickerOptionsToolControllerOptions;
@class PESDKTransformToolControllerOptions;
@class PESDKFocusToolControllerOptions;
@class PESDKTextToolControllerOptions;
@class IMGLTextOptionsToolControllerOptions;
@class PESDKTextFontToolControllerOptions;
@class PESDKTextColorToolControllerOptions;
@class PESDKFrameToolControllerOptions;
@class PESDKConfigurationBuilder;

/// An Configuration defines behaviour and look of all view controllers
/// provided by the PhotoEditorSDK. It uses the builder pattern to create an
/// immutable object via a closure. To configure the different editors and
/// viewControllers contained in the SDK, edit their options in the corresponding
/// <code>configure*ViewController</code> method of the <code>ConfigurationBuilder</code>.
SWIFT_CLASS_NAMED("Configuration")
@interface PESDKConfiguration : NSObject
/// The background color. Defaults to black.
@property (nonatomic, readonly, strong) UIColor * _Nonnull backgroundColor;
/// The background color of the accessory view. Defaults to gray.
@property (nonatomic, readonly, strong) UIColor * _Nonnull accessoryViewBackgroundColor;
/// The color of the separator that is drawn to separate different menu items.
@property (nonatomic, readonly, strong) UIColor * _Nonnull separatorColor;
/// Options for the <code>CameraViewController</code>.
@property (nonatomic, readonly, strong) PESDKCameraViewControllerOptions * _Nonnull cameraViewControllerOptions;
/// Options for the <code>PhotoEditViewController</code>.
@property (nonatomic, readonly, strong) PESDKPhotoEditViewControllerOptions * _Nonnull photoEditViewControllerOptions;
/// Options for the <code>FilterToolController</code>.
@property (nonatomic, readonly, strong) PESDKFilterToolControllerOptions * _Nonnull filterToolControllerOptions;
/// Options for the <code>OverlayToolController</code>.
@property (nonatomic, readonly, strong) PESDKOverlayToolControllerOptions * _Nonnull overlayToolControllerOptions;
/// Options for the <code>StickerToolController</code>.
@property (nonatomic, readonly, strong) PESDKStickerToolControllerOptions * _Nonnull stickerToolControllerOptions;
/// Options for the <code>StickerOptionsToolController</code>.
@property (nonatomic, readonly, strong) PESDKStickerOptionsToolControllerOptions * _Nonnull stickerOptionsToolControllerOptions;
/// Options for the <code>StickerColorToolController</code>.
@property (nonatomic, readonly, strong) PESDKColorToolControllerOptions * _Nonnull stickerColorToolControllerOptions;
/// Options for the <code>TransformToolController</code>.
@property (nonatomic, readonly, strong) PESDKTransformToolControllerOptions * _Nonnull transformToolControllerOptions;
/// Options for the <code>FocusToolController</code>.
@property (nonatomic, readonly, strong) PESDKFocusToolControllerOptions * _Nonnull focusToolControllerOptions;
/// Options for the <code>TextToolController</code>.
@property (nonatomic, readonly, strong) PESDKTextToolControllerOptions * _Nonnull textToolControllerOptions;
/// Options for the <code>TextOptionsToolController</code>.
@property (nonatomic, readonly, strong) IMGLTextOptionsToolControllerOptions * _Nonnull textOptionsToolControllerOptions;
/// Options for the <code>TextFontToolController</code>.
@property (nonatomic, readonly, strong) PESDKTextFontToolControllerOptions * _Nonnull textFontToolControllerOptions;
/// Options for the <code>TextColorToolController</code>.
@property (nonatomic, readonly, strong) PESDKTextColorToolControllerOptions * _Nonnull textColorToolControllerOptions;
/// Options for the <code>AdjustToolController</code>.
@property (nonatomic, readonly, strong) PESDKAdjustToolControllerOptions * _Nonnull adjustToolControllerOptions;
/// Options for the <code>BrushToolController</code>.
@property (nonatomic, readonly, strong) PESDKBrushToolControllerOptions * _Nonnull brushToolControllerOptions;
/// Options for the <code>BrushColorToolController</code>.
@property (nonatomic, readonly, strong) PESDKColorToolControllerOptions * _Nonnull brushColorToolControllerOptions;
/// Options for the `FrameToolController.
@property (nonatomic, readonly, strong) PESDKFrameToolControllerOptions * _Nonnull frameToolControllerOptions;
/// Returns a newly allocated instance of a <code>Configuration</code> using the default builder.
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Creates a newly allocated instance of <code>Configuration</code> using the given builder.
/// \param builder An instance of <code>ConfigurationBuilder</code>.
///
- (nonnull instancetype)initWithBuilder:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKConfigurationBuilder * _Nonnull))builder OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKPhotoEditViewControllerOptionsBuilder;
@class PESDKFilterToolControllerOptionsBuilder;
@class PESDKOverlayToolControllerOptionsBuilder;
@class PESDKStickerToolControllerOptionsBuilder;
@class PESDKStickerOptionsToolControllerOptionsBuilder;
@class PESDKFocusToolControllerOptionsBuilder;
@class PESDKTransformToolControllerOptionsBuilder;
@class PESDKTextToolControllerOptionsBuilder;
@class PESDKTextOptionsToolControllerOptionsBuilder;
@class PESDKTextFontToolControllerOptionsBuilder;
@class PESDKTextColorToolControllerOptionsBuilder;
@class PESDKFrameToolControllerOptionsBuilder;

/// The configuration builder object offers all properties of <code>Configuration</code> in
/// a mutable version, in order to build an immutable <code>Configuration</code> object. To
/// further configure the different viewcontrollers, use the <code>configureXYZViewController</code>
/// methods to edit the given options.
SWIFT_CLASS_NAMED("ConfigurationBuilder")
@interface PESDKConfigurationBuilder : NSObject
/// The background color. Defaults to black.
@property (nonatomic, strong) UIColor * _Nonnull backgroundColor;
/// The background color of the accessory view. Defaults to gray.
@property (nonatomic, strong) UIColor * _Nonnull accessoryViewBackgroundColor;
/// The color of the separator that is drawn to separate different menu items
@property (nonatomic, strong) UIColor * _Nonnull separatorColor;
/// Options for the <code>CameraViewController</code>.
- (void)configureCameraViewController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKCameraViewControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>PhotoEditorViewController</code>.
- (void)configurePhotoEditorViewController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKPhotoEditViewControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>FilterToolController</code>.
- (void)configureFilterToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKFilterToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>OverlayToolController</code>.
- (void)configureOverlayToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKOverlayToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>StickerToolController</code>.
- (void)configureStickerToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKStickerToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>StickerOptionsToolController</code>.
- (void)configureStickerOptionsToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKStickerOptionsToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>StickerColorToolController</code>.
- (void)configureStickerColorToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKColorToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>FocusToolController</code>.
- (void)configureFocusToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKFocusToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TransformToolController</code>.
- (void)transformToolControllerOptions:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTransformToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TextToolController</code>.
- (void)configureTextToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTextToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TextOptionsToolController</code>.
- (void)configureTextOptionsToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTextOptionsToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TextFontToolController</code>.
- (void)configureTextFontToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTextFontToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TextColorToolController</code>.
- (void)configureTextColorToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTextColorToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>AdjustToolController</code>.
- (void)configureAdjustToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKAdjustToolControllerOptionsBuilder * _Nonnull))builder SWIFT_AVAILABILITY(ios,introduced=9.0);
/// Options for the <code>BrushToolController</code>.
- (void)configureBrushToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKBrushToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>BrushToolController</code>.
- (void)configureBrushColorToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKColorToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>TransformToolController</code>.
- (void)configureTransformToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKTransformToolControllerOptionsBuilder * _Nonnull))builder;
/// Options for the <code>FrameToolController</code>.
- (void)configureFrameToolController:(SWIFT_NOESCAPE void (^ _Nonnull)(PESDKFrameToolControllerOptionsBuilder * _Nonnull))builder;
/// Use this to use a specific subclass instead of the default PhotoEditorSDK <em>view controller</em>
/// classes. This works across all the whole framework and allows you to subclass all usages of
/// a class. As of now, only <em>view controller</em> can be replaced!
/// \param builtinClass The built in class, that should be replaced.
///
/// \param replacingClass The class that replaces the builtin class.
///
/// \param moduleName The module name of the replacing class (e.g. Your_App). Usually the module name
/// of your app can be found under ‘Product Module Name’ in your app targets build
/// settings.
///
///
/// throws:
/// An exception if the replacing class is not a subclass of the replaced class.
- (BOOL)replaceClass:(SWIFT_METATYPE(NSObject) _Nonnull)builtinClass replacingClass:(SWIFT_METATYPE(NSObject) _Nonnull)replacingClass moduleName:(NSString * _Nonnull)moduleName error:(NSError * _Nullable * _Nullable)error;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@protocol PESDKCropAndStraightenViewDelegate;

/// The <code>CropAndStraightenView</code> class provides support for displaying, zooming, rotating and
/// cropping an image.
SWIFT_CLASS_NAMED("CropAndStraightenView")
@interface PESDKCropAndStraightenView : UIView
/// The delegate of the <code>CropAndStraightenView</code> object.
@property (nonatomic, weak) id <PESDKCropAndStraightenViewDelegate> _Nullable delegate;
/// The image that is to be displayed.
@property (nonatomic, strong) UIImage * _Nullable image;
/// The straighten angle to apply to the image in radians.
@property (nonatomic) CGFloat straightenAngle;
/// The crop rect to apply to the image. This should be a normalized <code>CGRect</code>.
@property (nonatomic) CGRect cropRect;
/// The orientation to apply to the image.
@property (nonatomic) enum PESDKOrientation orientation;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// The crop rect in image dimensions.
@property (nonatomic, readonly) CGRect imageCropRect;
/// Converts a view rect to image dimensions.
/// \param viewRect The view rect to convert.
///
///
/// returns:
/// The crop rect in image dimensions.
- (CGRect)imageCropRectForViewRect:(CGRect)viewRect SWIFT_WARN_UNUSED_RESULT;
/// Returns whether the user has touched the content to initiate scrolling.
/// note:
/// The value of this property is <code>true</code> if the user has touched the image but might
/// not have yet have started dragging it.
@property (nonatomic, readonly) BOOL isTracking;
/// Returns whether the content is moving in the view after the user lifted their finger.
/// note:
/// The returned value is <code>true</code> if user isn’t dragging the content but scrolling
/// is still occurring.
@property (nonatomic, readonly) BOOL isDecelerating;
/// The frame of the crop canvas.
@property (nonatomic) CGRect canvasFrame;
@end


@interface PESDKCropAndStraightenView (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)otherGestureRecognizer SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKCropAndStraightenView (SWIFT_EXTENSION(PhotoEditorSDK)) <UIScrollViewDelegate>
/// :nodoc:
- (void)scrollViewDidScroll:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewDidZoom:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewDidEndDragging:(UIScrollView * _Nonnull)scrollView willDecelerate:(BOOL)decelerate;
/// :nodoc:
- (void)scrollViewDidEndZooming:(UIScrollView * _Nonnull)scrollView withView:(UIView * _Nullable)view atScale:(CGFloat)scale;
/// :nodoc:
- (void)scrollViewDidEndDecelerating:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT;
@end


/// The methods declared by the <code>CropAndStraightenViewDelegate</code> protocol allow the adopting
/// delegate to respond to message from the <code>CropAndStraightenView</code> class and thus respond to
/// operations such as tracking.
SWIFT_PROTOCOL_NAMED("CropAndStraightenViewDelegate")
@protocol PESDKCropAndStraightenViewDelegate
/// Called just before the crop and straighten view begins tracking.
/// \param cropAndStraightenView The view that is about to begin tracking.
///
- (void)cropAndStraightenViewWillBeginTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// Called just after the crop and straighten view finished tracking.
/// \param cropAndStraightenView The view that finished tracking.
///
- (void)cropAndStraightenViewDidEndTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// Called when the crop and straighten view tracked user interaction.
/// \param cropAndStraightenView The view that tracked user interaction.
///
- (void)cropAndStraightenViewDidTrack:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
@end


/// The <code>CropAspect</code> class is used to specify the available crop aspect ratios for the
/// <code>TransformToolController</code>.
SWIFT_CLASS_NAMED("CropAspect")
@interface PESDKCropAspect : NSObject
/// :nodoc:
- (nonnull instancetype)init;
/// Creates a new instance of <code>CropAspect</code>. The aspect ratio is <code>width</code> divided by <code>height</code>.
/// \param width The width of the aspect ratio.
///
/// \param height The height of the aspect ratio.
///
- (nonnull instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height;
/// Creates a new instance of <code>CropAspect</code> with a custom localized name. Usually the aspect
/// ratio will be used as the name, but with this initializer it is possible to use a different
/// name such as <code>Square</code> instead of <code>1.0</code>.
/// \param width The width of the aspect ratio.
///
/// \param height The height of the aspect ratio.
///
/// \param localizedName The custom localized name for this aspect ratio.
///
- (nonnull instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height localizedName:(NSString * _Nonnull)localizedName;
/// Creates a new instance of <code>CropAspect</code> with a custom localized name. Usually the aspect
/// ratio will be used as the name, but with this initializer it is possible to use a different
/// name such as <code>Square</code> instead of <code>1.0</code>.
/// \param width The width of the aspect ratio.
///
/// \param height The height of the aspect ratio.
///
/// \param localizedName The custom localized name for this aspect ratio.
///
/// \param rotatable Whether this crop aspect can be rotated by tapping on it in the transform tool.
///
- (nonnull instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height localizedName:(NSString * _Nonnull)localizedName rotatable:(BOOL)rotatable OBJC_DESIGNATED_INITIALIZER;
/// The width of the aspect ratio.
@property (nonatomic, readonly) CGFloat width;
/// The height of the aspect ratio.
@property (nonatomic, readonly) CGFloat height;
/// The localized name of the aspect ratio.
@property (nonatomic, readonly, copy) NSString * _Nonnull localizedName;
/// Whether this crop aspect can be rotated by tapping on it in the transform tool.
@property (nonatomic, readonly) BOOL isRotatable;
/// The calculated ratio (i.e. <code>width / height</code>).
@property (nonatomic, readonly) CGFloat ratio;
/// Calculates the width for a given height.
/// \param height The height to calculate the matching width for.
///
///
/// returns:
/// The width for the given height.
- (CGFloat)widthForHeight:(CGFloat)height SWIFT_WARN_UNUSED_RESULT;
/// Calculates the height for a given width.
/// \param width The width to calculate the matching height for.
///
///
/// returns:
/// The height for the given width.
- (CGFloat)heightForWidth:(CGFloat)width SWIFT_WARN_UNUSED_RESULT;
/// Creates the reversed aspect ratio.
@property (nonatomic, readonly, strong) PESDKCropAspect * _Nonnull inversed;
/// :nodoc:
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
@end


/// A <code>CropHandleView</code> represents the interactive, draggable part of a crop rect.
SWIFT_CLASS_NAMED("CropHandleView")
@interface PESDKCropHandleView : UIView
/// Whether the handle view is at the top.
@property (nonatomic, readonly) BOOL isTop;
/// Whether the handle view is on the left.
@property (nonatomic, readonly) BOOL isLeft;
/// Whether the handle view is on the right.
@property (nonatomic, readonly) BOOL isRight;
/// Whether the handle view is at the bottom.
@property (nonatomic, readonly) BOOL isBottom;
/// Whether the handle view is a corner.
@property (nonatomic, readonly) BOOL isCorner;
/// Whether the handle view is lateral.
@property (nonatomic, readonly) BOOL isLateral;
/// Whether the line weight for the handle is heavy to visualize interaction.
@property (nonatomic) BOOL isLineWeightHeavy;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

@class UIVisualEffectView;

/// A <code>CropMaskView</code> is a view that blurs the content behind it.
SWIFT_CLASS_NAMED("CropMaskView")
@interface PESDKCropMaskView : UIView
/// The underlying <code>UIVisualEffectView</code>.
@property (nonatomic, readonly, strong) UIVisualEffectView * _Nonnull effectView;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// The <code>CropOverlayView</code> is added above the <code>CropAndStraightenView</code> to display the UI elements to
/// adjust the crop rect and hosts the mask views to dim the content that is outside the crop rect.
SWIFT_CLASS_NAMED("CropOverlayView")
@interface PESDKCropOverlayView : UIView
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// Whether the masked content is currently visible.
@property (nonatomic) BOOL isMaskedContentVisible;
/// Hides or shows the masked content.
/// \param visible Whether the masked content should be visible.
///
/// \param animated Whether to animate the change.
///
- (void)setMaskedContentVisible:(BOOL)visible animated:(BOOL)animated;
/// The frame of the crop rect.
@property (nonatomic) CGRect cropRect;
/// Whether the crop grid is currently visible.
@property (nonatomic) BOOL isCropGridVisible;
/// Hides or shows the crop grid.
/// \param visible Whether the crop grid should be visible.
///
/// \param animated Whether to animate the change.
///
- (void)setCropGridVisible:(BOOL)visible animated:(BOOL)animated;
/// Whether the straighten grid is currently visible.
@property (nonatomic) BOOL isStraightenGridVisible;
/// Hides or shows the straighten grid.
/// \param visible Whether the straighten grid should be visible.
///
/// \param animated Whether to animate the change.
///
- (void)setStraightenGridVisible:(BOOL)visible animated:(BOOL)animated;
@end


/// This class provides our own implementation of adjustment filters.
/// Using these we get more consistant results across the several platforms.
SWIFT_CLASS_NAMED("CustomAdjustmentsFilter")
@interface PESDKCustomAdjustmentsFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The brightness value.
@property (nonatomic, strong) NSNumber * _Nullable inputBrightness;
/// The contrast value.
@property (nonatomic, strong) NSNumber * _Nullable inputContrast;
/// The saturation value.
@property (nonatomic, strong) NSNumber * _Nullable inputSaturation;
/// The shadows value.
@property (nonatomic, strong) NSNumber * _Nullable inputShadows;
/// The highlights value.
@property (nonatomic, strong) NSNumber * _Nullable inputHighlights;
/// The exposure value.
@property (nonatomic, strong) NSNumber * _Nullable inputExposure;
/// Returns an image with the applied changes.
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKFrameImageGroup;
enum FrameLayoutMode : NSInteger;

/// The configuration for the build engine.
SWIFT_CLASS_NAMED("CustomPatchConfiguration")
@interface PESDKCustomPatchConfiguration : NSObject
/// The top image group.
@property (nonatomic, strong) PESDKFrameImageGroup * _Nullable topImageGroup;
/// The lefe image group.
@property (nonatomic, strong) PESDKFrameImageGroup * _Nullable leftImageGroup;
/// The bottom image group.
@property (nonatomic, strong) PESDKFrameImageGroup * _Nullable bottomImageGroup;
/// The right image group.
@property (nonatomic, strong) PESDKFrameImageGroup * _Nullable rightImageGroup;
/// The layout mode.
@property (nonatomic) enum FrameLayoutMode layoutMode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// Every frame builder must implement this protocol.
SWIFT_PROTOCOL_NAMED("FrameBuilder")
@protocol PESDKFrameBuilderProtocol
/// Builds an asset following the configuration settings, for the chosen size.
/// \param size The desired size of the output image.
///
/// \param relativeScale The scale of the frame, relative the minimum of width and height.
///
/// \param completion A completion block that gets the resulting image as parameter.
///
- (void)buildWithSize:(CGSize)size relativeScale:(CGFloat)relativeScale completion:(SWIFT_NOESCAPE void (^ _Nonnull)(UIImage * _Nullable))completion;
@end


/// A framebuilder for custom patches.
/// Each patch consists of four groups. There are two basic layouts.
/// The first one places the top and bottom group above the full width of the image,
/// and the left and right group in between. The second layout works the other way around.
SWIFT_CLASS_NAMED("CustomPatchFrameBuilder")
@interface PESDKCustomPatchFrameBuilder : NSObject <PESDKFrameBuilderProtocol>
/// Returns a newly allocated instance of <code>CustomPatchFrameBuilder</code>.
/// \param configuration The configutation to use.
///
- (nonnull instancetype)initWithConfiguration:(PESDKCustomPatchConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
/// Builds an asset following the configuration settings, for the chosen size.
/// \param size The desired size of the output image.
///
/// \param relativeScale The scale of the frame, relative the minimum of width and height.
///
///
/// returns:
/// The resulting asset.
- (void)buildWithSize:(CGSize)size relativeScale:(CGFloat)relativeScale completion:(SWIFT_NOESCAPE void (^ _Nonnull)(UIImage * _Nullable))completion;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// This class provides the methods to generate the dynamic frame-builders provided by the SDK.
SWIFT_CLASS_NAMED("DefaultDynamicFrames")
@interface PESDKDefaultDynamicFrames : NSObject
/// Returns the builder for the ‘imgly_frame_art_decor’ frame.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKCustomPatchFrameBuilder * _Nonnull artDecorFrameBuilder;)
+ (PESDKCustomPatchFrameBuilder * _Nonnull)artDecorFrameBuilder SWIFT_WARN_UNUSED_RESULT;
/// Returns the builder for the ‘imgly_frame_wood_passepartout’ frame.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKCustomPatchFrameBuilder * _Nonnull woodPassepartoutFrameBuilder;)
+ (PESDKCustomPatchFrameBuilder * _Nonnull)woodPassepartoutFrameBuilder SWIFT_WARN_UNUSED_RESULT;
/// Returns the builder for the ‘imgly_frame_black_passepartout’ frame.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKCustomPatchFrameBuilder * _Nonnull blackPassepartoutFrameBuilder;)
+ (PESDKCustomPatchFrameBuilder * _Nonnull)blackPassepartoutFrameBuilder SWIFT_WARN_UNUSED_RESULT;
/// Returns the builder for the ‘imgly_frame_dia’ frame.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKCustomPatchFrameBuilder * _Nonnull diaFrameBuilder;)
+ (PESDKCustomPatchFrameBuilder * _Nonnull)diaFrameBuilder SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// The logger is used by the SDK, to promote import informations.
/// A client could use his own logger to log the messages to a server or
/// something alike.
SWIFT_PROTOCOL_NAMED("LoggerProtocol")
@protocol PESDKLoggerProtocol
/// Logs an error.
/// \param message A message.
///
- (void)error:(NSString * _Nonnull)message;
/// Logs a warning.
/// \param message A message.
///
- (void)warn:(NSString * _Nonnull)message;
/// Logs an info level message.
/// \param message A message.
///
- (void)info:(NSString * _Nonnull)message;
/// Logs a debug level message.
/// \param message A message.
///
- (void)debug:(NSString * _Nonnull)message;
/// Logs a trace level message.
/// \param message A message.
///
- (void)trace:(NSString * _Nonnull)message;
@end


/// The default logger provided by the SDK. It will log into the xcode console.
SWIFT_CLASS_NAMED("DefaultLogger")
@interface PESDKDefaultLogger : NSObject <PESDKLoggerProtocol>
/// Logs an error.
/// \param message A message.
///
- (void)error:(NSString * _Nonnull)message;
/// Logs a warning.
/// \param message A message.
///
- (void)warn:(NSString * _Nonnull)message;
/// Logs an info level message.
/// \param message A message.
///
- (void)info:(NSString * _Nonnull)message;
/// Logs a debug level message.
/// \param message A message.
///
- (void)debug:(NSString * _Nonnull)message;
/// Logs a trace level message.
/// \param message A message.
///
- (void)trace:(NSString * _Nonnull)message;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// To use a custom progress HUD when saving a photo or while downloading stickers etc., your
/// progress view must implement this protocol. Please note that your custom progress view should
/// disable user interaction in all parts of the editor. Changing state while the progress view
/// is visible can cause unexpected behavior.
SWIFT_PROTOCOL_NAMED("ProgressView")
@protocol PESDKProgressView
/// Displays the progress HUD with the given message.
/// \param message The message to display in the progress HUD.
///
- (void)showWithMessage:(NSString * _Nonnull)message;
/// Hides the progress HUD.
- (void)hide;
@end


/// A <code>ProgressView</code> is an activity indicator that is shown on top of all other views in a HUD style
/// and temporarily blocks all user interaction with other views.
SWIFT_CLASS_NAMED("DefaultProgressView")
@interface PESDKDefaultProgressView : NSObject <PESDKProgressView>
/// The main container view of the progress view.
@property (nonatomic, readonly, strong) UIView * _Nonnull overlayView;
/// The background view that is being animated in.
@property (nonatomic, readonly, strong) UIView * _Nonnull backgroundView;
/// The image view that holds the spinner.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// The label that contains the loading message.
@property (nonatomic, readonly, strong) UILabel * _Nonnull label;
/// The duration of one rotation of the spinner.
@property (nonatomic) double animationDuration;
/// A shared instance for convenience.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKDefaultProgressView * _Nonnull sharedView;)
+ (PESDKDefaultProgressView * _Nonnull)sharedView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Presents the activity indicator with the given message.
/// \param message The message to present.
///
- (void)showWithMessage:(NSString * _Nonnull)message;
/// Hides the activity indicator.
- (void)hide;
@end

@class PESDKToolbarButton;

/// A <code>ToolbarItem</code> hosts views which are displayed in the <code>toolbar</code> of a <code>ToolbarController</code>.
/// If the toolbar controller is embedded into an <code>UINavigationController</code>, those views are added
/// to the navigation controller’s navigation bar.
SWIFT_CLASS_NAMED("ToolbarItem")
@interface PESDKToolbarItem : NSObject
/// The title view is displayed in the center of the toolbar or navigation bar.
@property (nonatomic, strong) UIView * _Nullable titleView;
/// The left button is displayed on the left side of the toolbar or navigation bar.
@property (nonatomic, strong) PESDKToolbarButton * _Nullable leftButton;
/// The right button is displayed on the right side of the toolbar or navigation bar.
@property (nonatomic, strong) PESDKToolbarButton * _Nullable rightButton;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>DefaultToolbarItem</code> is a toolbar item with a label in the center and a default discard
/// button on the left and apply button on the right. It is used in most tool controllers.
SWIFT_CLASS_NAMED("DefaultToolbarItem")
@interface PESDKDefaultToolbarItem : PESDKToolbarItem
/// The title label of the item.
@property (nonatomic, strong) UILabel * _Nonnull titleLabel;
/// The default discard button on the left.
@property (nonatomic, strong) PESDKToolbarButton * _Nonnull discardButton;
/// The default apply button on the right.
@property (nonatomic, strong) PESDKToolbarButton * _Nonnull applyButton;
/// :nodoc:
@property (nonatomic, strong) UIView * _Nullable titleView;
/// :nodoc:
@property (nonatomic, strong) PESDKToolbarButton * _Nullable leftButton;
/// :nodoc:
@property (nonatomic, strong) PESDKToolbarButton * _Nullable rightButton;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// Used to determine device orientation even if orientation lock is active.
SWIFT_CLASS_NAMED("DeviceOrientationController")
@interface PESDKDeviceOrientationController : NSObject
/// Starts to observe the accelerometer to update the capture video orientation.
/// This needs to be done, to capture with the correct device orientation.
- (void)start;
/// Stops observing the acceleronmenter.
- (void)stop;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKGradientView;

/// A <code>FilterCollectionViewCell</code> is a cell that shows an image (usually with a filter applied to it)
/// and a label at the bottom. When selected the cell has an overlay, a label for the intensity and
/// an selection indicator.
SWIFT_CLASS_NAMED("FilterCollectionViewCell")
@interface PESDKFilterCollectionViewCell : UICollectionViewCell
/// The image view that display the image.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// A gradient from transparent to black that is behind the label for better readability.
@property (nonatomic, readonly, strong) PESDKGradientView * _Nonnull gradientView;
/// A label at the bottom of the cell
@property (nonatomic, readonly, strong) UILabel * _Nonnull captionLabel;
/// An activity indicator that is centered above the image and usually only shown while the image is loading.
@property (nonatomic, readonly, strong) UIActivityIndicatorView * _Nonnull activityIndicator;
/// An overlay that is visible when the cell is selected
@property (nonatomic, readonly, strong) PESDKGradientView * _Nonnull selectionOverlay;
/// A selection indicator at the bottom of the cell.
@property (nonatomic, readonly, strong) UIView * _Nonnull selectionIndicator;
/// A label that is visible when the cell is selected.
@property (nonatomic, readonly, strong) UILabel * _Nonnull selectionLabel;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// A <code>FilterSelectionController</code> contains everything that is needed to display a list of available filters.
SWIFT_CLASS_NAMED("FilterSelectionController")
@interface PESDKFilterSelectionController : NSObject
/// The collection view that presents all available filters.
@property (nonatomic, readonly, strong) UICollectionView * _Nonnull collectionView;
/// This block is called when a new photo effect is selected.
@property (nonatomic, copy) void (^ _Nullable selectedBlock)(PESDKPhotoEffect * _Nonnull);
/// This block is used to determine the currently applied photo effect.
@property (nonatomic, copy) PESDKPhotoEffect * _Nullable (^ _Nullable activePhotoEffectBlock)(void);
/// This block is used to configure the filter collection view cell.
@property (nonatomic, copy) void (^ _Nullable cellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKPhotoEffect * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>FilterSelectionController</code> using the given input image.
/// \param inputImage The input image that should be used to preview the filters.
///
///
/// returns:
/// An instance of a <code>FilterSelectionController</code>.
- (nonnull instancetype)initWithInputImage:(UIImage * _Nullable)inputImage OBJC_DESIGNATED_INITIALIZER;
/// Updates the cell selection based on the <code>activePhotoEffectBlock</code>.
/// \param animated If <code>true</code> the selection will be animated.
///
- (void)updateSelectionWithAnimated:(BOOL)animated;
@end


@interface PESDKFilterSelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKFilterSelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKFilterSelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>FilterToolController</code> is reponsible for displaying the UI to apply an effect filter to an image.
SWIFT_CLASS_NAMED("FilterToolController")
@interface PESDKFilterToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
- (void)photoEditModelDidChange;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKFilterToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


/// Options for configuring a <code>FilterToolController</code>.
SWIFT_CLASS_NAMED("FilterToolControllerOptions")
@interface PESDKFilterToolControllerOptions : PESDKToolControllerOptions
/// This closure can be used to configure the filter intensity slider.
@property (nonatomic, readonly, copy) void (^ _Nullable filterIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the filter intensity slider’s container view.
@property (nonatomic, readonly, copy) void (^ _Nullable filterIntensitySliderContainerConfigurationClosure)(UIView * _Nonnull);
/// Enable/Disable the filter intensity slider. Defaults to true.
@property (nonatomic, readonly) BOOL showFilterIntensitySlider;
/// The intensity that should be initialy applied to a filter when selecting it. Defaults to 75 %.
@property (nonatomic, readonly) CGFloat initialFilterIntensity;
/// This closure is called every time the user selects a filter.
@property (nonatomic, readonly, copy) void (^ _Nullable filterSelectedClosure)(PESDKPhotoEffect * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the
/// selected instance of <code>PhotoEffect</code> will be passed as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable filterIntensityChangedClosure)(PESDKSlider * _Nonnull, PESDKPhotoEffect * _Nonnull);
/// This closure allows further configuration of the filter cells. The closure is called for
/// each filter cell and has the cell and its corresponding instance of <code>PhotoEffect</code> as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable filterCellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKPhotoEffect * _Nonnull);
/// Returns a newly allocated instance of a <code>FilterToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>FilterToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>FilterToolControllerOptions</code> using the given builder.
/// \param builder A <code>FilterToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>FilterToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKFilterToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>FilterToolControllerOptionsBuilder</code> for <code>FilterToolControllerOptions</code>.
SWIFT_CLASS_NAMED("FilterToolControllerOptionsBuilder")
@interface PESDKFilterToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure can be used to configure the filter intensity slider.
@property (nonatomic, copy) void (^ _Nullable filterIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the filter intensity slider’s container view.
@property (nonatomic, copy) void (^ _Nullable filterIntensitySliderContainerConfigurationClosure)(UIView * _Nonnull);
/// Enable/Disable the filter intensity slider. Defaults to true.
@property (nonatomic) BOOL showFilterIntensitySlider;
/// The intensity that should be initialy applied to a filter when selecting it. Defaults to 75 %.
@property (nonatomic) CGFloat initialFilterIntensity;
/// This closure is called every time the user selects a filter.
@property (nonatomic, copy) void (^ _Nullable filterSelectedClosure)(PESDKPhotoEffect * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the
/// selected instance of <code>PhotoEffect</code> will be passed as parameters.
@property (nonatomic, copy) void (^ _Nullable filterIntensityChangedClosure)(PESDKSlider * _Nonnull, PESDKPhotoEffect * _Nonnull);
/// This closure allows further configuration of the filter cells. The closure is called for
/// each filter cell and has the cell and its corresponding instance of <code>PhotoEffect</code> as parameters.
@property (nonatomic, copy) void (^ _Nullable filterCellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKPhotoEffect * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end



@interface PESDKFocusGradientView (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)otherGestureRecognizer SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>FocusToolController</code> is reponsible for displaying the UI to adjust the focus of an image.
SWIFT_CLASS_NAMED("FocusToolController")
@interface PESDKFocusToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
- (void)photoEditModelDidChange;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKFocusToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKFocusToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKFocusToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKFocusToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKFocusToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end

enum PESDKFocusType : NSInteger;

/// Options for configuring a <code>FocusToolController</code>.
SWIFT_CLASS_NAMED("FocusToolControllerOptions")
@interface PESDKFocusToolControllerOptions : PESDKToolControllerOptions
/// This closure allows further configuration of the focus type buttons. The closure is called for
/// each focus type button and has the button and its corresponding focus type as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable focusTypeButtonConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull, enum PESDKFocusType);
/// This closure is called when the user selects a focus type.
@property (nonatomic, readonly, copy) void (^ _Nullable focusTypeSelectedClosure)(enum PESDKFocusType);
/// This closure can be used to configure the slider.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure is called whenever the slider changes its value. The instance of <code>Slider</code> and
/// the active focus type are passed as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum PESDKFocusType);
/// This closure can be used to configure the circle gradient view.
@property (nonatomic, readonly, copy) void (^ _Nullable circleGradientViewConfigurationClosure)(PESDKCircleGradientView * _Nonnull);
/// This closure can be used to configure the box gradient view.
@property (nonatomic, readonly, copy) void (^ _Nullable boxGradientViewConfigurationClosure)(PESDKBoxGradientView * _Nonnull);
/// Returns a newly allocated instance of a <code>FocusToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>FocusToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>FocusToolControllerOptions</code> using the given builder.
/// \param builder A <code>FocusToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>FocusToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKFocusToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>FocusToolControllerOptionsBuilder</code> for <code>FocusToolControllerOptions</code>.
SWIFT_CLASS_NAMED("FocusToolControllerOptionsBuilder")
@interface PESDKFocusToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure allows further configuration of the focus type buttons. The closure is called for
/// each focus type button and has the button and its corresponding focus type as parameters.
@property (nonatomic, copy) void (^ _Nullable focusTypeButtonConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull, enum PESDKFocusType);
/// This closure is called when the user selects a focus type.
@property (nonatomic, copy) void (^ _Nullable focusTypeSelectedClosure)(enum PESDKFocusType);
/// This closure can be used to configure the slider.
@property (nonatomic, copy) void (^ _Nullable sliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the view that contains the slider.
@property (nonatomic, copy) void (^ _Nullable sliderContainerConfigurationClosure)(UIView * _Nonnull);
/// This closure is called whenever the slider changes its value. The instance of <code>Slider</code> and
/// the active focus type are passed as parameters.
@property (nonatomic, copy) void (^ _Nullable sliderChangedValueClosure)(PESDKSlider * _Nonnull, enum PESDKFocusType);
/// This closure can be used to configure the circle gradient view.
@property (nonatomic, copy) void (^ _Nullable circleGradientViewConfigurationClosure)(PESDKCircleGradientView * _Nonnull);
/// This closure can be used to configure the box gradient view.
@property (nonatomic, copy) void (^ _Nullable boxGradientViewConfigurationClosure)(PESDKBoxGradientView * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKFocusToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>PESDKFocusType</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedFocusTypes</code> with the corresponding <code>PESDKFocusType</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedFocusTypesAsNSNumbers;
@end

/// Represents the type of focus that should be used in an image.
typedef SWIFT_ENUM_NAMED(NSInteger, PESDKFocusType, "FocusType") {
/// Focus should be disabled.
  PESDKFocusTypeOff = 0,
/// A linear focus should be used.
  PESDKFocusTypeLinear = 1,
/// A radial focus should be used.
  PESDKFocusTypeRadial = 2,
};


/// A <code>Font</code> represents meta information about a font, that should be loaded into the SDK.
/// If a font has a long name, the <code>displayName</code> can be used to substitude it within the UI.
/// The font name is used by iOS to identify the font. This is usualy the filename of the font.
/// But it can be different. To be sure use the font in a sandbox project, and get its ‘fontName’ attribute.
SWIFT_CLASS_NAMED("Font")
@interface PESDKFont : NSObject
/// The path to the font, e.g. path within a bundle. This is not needed when using
/// system fonts.
@property (nonatomic, readonly, copy) NSString * _Nonnull path;
/// Some font names are long and rather ugly. In that case it is possible to add an entry to
/// this dictionary, the key being the name of the font and the value being the name that
/// should be used instead.
@property (nonatomic, readonly, copy) NSString * _Nonnull displayName;
/// The name of the font.
@property (nonatomic, copy) NSString * _Nonnull fontName;
/// A unique identifier, that is used during (de)serialization to identify a font between platforms.
/// You might think that we could have used the fontName, but our experience showed us that this is not reliable.
/// Also if a font isn’t available, and you want to map it to a system font as substitute, you can use the identifier.
@property (nonatomic, copy) NSString * _Nonnull identifier;
/// Creates a font from the given font path, with the display name.
/// The font name will be used as argument for the <code>UIFont</code> initializer,
/// therefor the name does not necessarily need to equal the filename,
/// but rather the font family. Please refer to the official apple documentation for details.
/// If you have trouble loading a font, please set up a test project,
/// and try to load the font using <code>UIFont</code>, or use the interface builder to load the font,
/// and print out the <code>fontName</code>.
/// \param path The path to the font, e.g. path within a bundle.
///
/// \param displayName The name for the font that is used within the UI.
///
/// \param fontName The actual name of the font.
///
- (nonnull instancetype)initWithPath:(NSString * _Nonnull)path displayName:(NSString * _Nonnull)displayName fontName:(NSString * _Nonnull)fontName identifier:(NSString * _Nonnull)identifier OBJC_DESIGNATED_INITIALIZER;
/// Creates a font with the given name and display name.
/// This initializer should be used when adding system fonts.
/// The font name will be used as argument for the UIFont initializer.
/// \param displayName The name for the font that is used within the UI.
///
/// \param fontName The actual name of the font.
///
- (nonnull instancetype)initWithDisplayName:(NSString * _Nonnull)displayName fontName:(NSString * _Nonnull)fontName identifier:(NSString * _Nonnull)identifier OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// Provides functions to import fonts added as resources. It also registers them,
/// so that the application can load them like any other pre-installed font.
SWIFT_CLASS_NAMED("FontImporter")
@interface PESDKFontImporter : NSObject
/// This array contains all available fonts.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSArray<PESDKFont *> * _Nonnull all;)
+ (NSArray<PESDKFont *> * _Nonnull)all SWIFT_WARN_UNUSED_RESULT;
+ (void)setAll:(NSArray<PESDKFont *> * _Nonnull)value;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@protocol PESDKFontSelectorViewDelegate;

/// The <code>FontSelectorView</code> is a subclass of <code>UIScrollView</code> that presents a scrollable list of fonts.
SWIFT_CLASS_NAMED("FontSelectorView")
@interface PESDKFontSelectorView : UIScrollView
/// The receiver’s delegate.
/// seealso:
/// <code>FontSelectorViewDelegate</code>.
@property (nonatomic, weak) id <PESDKFontSelectorViewDelegate> _Nullable selectorDelegate;
/// The text color for the fonts.
@property (nonatomic, strong) UIColor * _Nonnull textColor;
/// The text color for the font’s label.
@property (nonatomic, strong) UIColor * _Nonnull labelColor;
/// The name of the currently selected font.
@property (nonatomic, copy) NSString * _Nullable selectedFontName;
/// The preview text.
@property (nonatomic, copy) NSString * _Nullable text;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)layoutSubviews;
@end


/// The <code>FontSelectorViewDelegate</code> protocol defines methods that allow you to respond to the events
/// of an instance of <code>FontSelectorView</code>.
SWIFT_PROTOCOL_NAMED("FontSelectorViewDelegate")
@protocol PESDKFontSelectorViewDelegate
/// Called when a font was selected in the font selector view.
/// \param fontSelectorView The font selector view that the font was selected in.
///
/// \param fontName The name of the font that was selected.
///
- (void)fontSelectorView:(PESDKFontSelectorView * _Nonnull)fontSelectorView didSelectFontWithName:(NSString * _Nonnull)fontName;
@end


/// A <code>Frame</code> represents a unique frame, which can have multiple images for different aspect ratios.
/// The matching image for the current aspect ratio will be used automatically. Each frame neeeds at
/// least one image and one thumbnail image. If no thumbnail is provide, it is automatically generated.
SWIFT_CLASS_NAMED("Frame")
@interface PESDKFrame : NSObject
/// The amount by which the image should be inset when this frame is applied. The inset is
/// specified as a value relative to the smaller side of the image.
@property (nonatomic) UIEdgeInsets imageInsets;
/// The tolerance that is used to check if this frame
/// is a good match for a certain ratio.
@property (nonatomic, readonly) CGFloat tolerance;
/// This string is used to identify this frame. It must be unique.
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier;
/// This indicates if a Frame is dynamic. A dynamic frame is composed of other images,
/// and therefore it can be adjusted to fit every ratio.
@property (nonatomic, readonly) BOOL isDynamic;
/// Instantiates a new <code>Frame</code>, built using the given frame builder.
/// Use this initializer for dynamic frames.
/// \param frameBuilder The builder that will build the frame.
///
/// \param relativeScale The relative scale of the frame. Relative to the shorter side of an image.
///
/// \param thumbnailURL A <code>URL</code> for the thumbnail asset.
///
- (nonnull instancetype)initWithFrameBuilder:(id <PESDKFrameBuilderProtocol> _Nonnull)frameBuilder relativeScale:(CGFloat)relativeScale thumbnailURL:(NSURL * _Nonnull)thumbnailURL identifier:(NSString * _Nonnull)identifier OBJC_DESIGNATED_INITIALIZER;
/// Returns a new <code>Frame</code>. Use this initializer for static frames.
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier tolerance:(CGFloat)tolerance OBJC_DESIGNATED_INITIALIZER;
/// Adds an image for a given ratio to this frame.
/// \param imageURL The url for the frame’s full size image. This can be a file url or a remote
/// /    url.
///
/// \param thumbnailURL The url for the frame’s thumbnail image. This can be a file url or a
/// remote url.
///
/// \param ratio The ratio that this image should be used for.
///
- (void)addImage:(NSURL * _Nonnull)imageURL thumbnailURL:(NSURL * _Nullable)thumbnailURL forRatio:(CGFloat)ratio;
/// The image url for a given ratio.
/// \param ratio The ratio to get the image url for.
///
///
/// returns:
/// An image url or <code>nil</code>.
- (NSURL * _Nullable)imageURLForRatio:(CGFloat)ratio SWIFT_WARN_UNUSED_RESULT;
/// The mask image url for a given ratio.
/// \param ratio The ratio to get the image url for.
///
/// \param tolerance The tolerance that is used to pick the correct image based on the
/// aspect ratio.
///
///
/// returns:
/// An image url or <code>nil</code>.
- (NSURL * _Nullable)maskImageURLForRatio:(CGFloat)ratio withTolerance:(CGFloat)tolerance SWIFT_WARN_UNUSED_RESULT;
/// Generates a frame asset for the given size, using a <code>FrameBuilder</code>.
/// \param size The desired size.
///
///
/// returns:
/// A the generated asset.
- (void)imageForSize:(CGSize)size completion:(SWIFT_NOESCAPE void (^ _Nonnull)(UIImage * _Nullable))completion;
/// This method generates a thumbnail of a dynamic frame.
/// After generation, the image is saved to the photo album.
/// \param size The desired size.
///
- (void)saveThumbnailToCameraRollForSize:(CGSize)size;
/// The thumbnail url for a given ratio.
/// \param ratio The ratio to get the thumbnail url for.
///
///
/// returns:
/// A thumbnail url or <code>nil</code>.
- (NSURL * _Nullable)thumbnailURLForRatio:(CGFloat)ratio SWIFT_WARN_UNUSED_RESULT;
/// Checks whether a frame has an image added for a given ratio.
/// \param ratio The ratio to check.
///
///
/// returns:
/// <code>true</code> if an image for this ratio was added, <code>false</code> otherwise.
- (BOOL)hasImageForRatio:(CGFloat)ratio SWIFT_WARN_UNUSED_RESULT;
/// The pool of frames that is available within the SDK.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSArray<PESDKFrame *> * _Nonnull all;)
+ (NSArray<PESDKFrame *> * _Nonnull)all SWIFT_WARN_UNUSED_RESULT;
+ (void)setAll:(NSArray<PESDKFrame *> * _Nonnull)value;
/// Creates the default frames that are shipped with the SDK.
///
/// returns:
/// An array of frames.
+ (NSArray<PESDKFrame *> * _Nonnull)createDefaultFrames SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

/// This enum is used during the builder to detmin the current phase.
typedef SWIFT_ENUM(NSInteger, FrameBuildMode) {
/// Used to indicate the horizontal phase.
  FrameBuildModeHorizontal = 0,
/// Used to indicate the vertical phase.
  FrameBuildModeVertical = 1,
};


@class PESDKIconBorderedCollectionViewCell;

/// A frame data source provides the frames that should be displayed in the frame tool.
SWIFT_CLASS_NAMED("FrameDataSource")
@interface PESDKFrameDataSource : NSObject
/// The collection view of this data source.
@property (nonatomic, readonly, strong) UICollectionView * _Nonnull collectionView;
/// The currently used image aspect ratio.
@property (nonatomic) CGFloat ratio;
/// Get all frames matching the set ratio and tolerance.
@property (nonatomic, readonly, copy) NSArray<PESDKFrame *> * _Nullable matchingFrames;
/// A closure that is called to modify the ‘No Frame’ cell.
@property (nonatomic, copy) void (^ _Nullable noFrameCellConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull);
/// A closure that is called to modify the cell for a given frame.
@property (nonatomic, copy) void (^ _Nullable frameCellConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKFrame * _Nonnull);
/// Creates a new frame data source for the given collection view.
/// \param collectionView The collection view of this data source.
///
- (nonnull instancetype)initWithCollectionView:(UICollectionView * _Nonnull)collectionView OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)refreshCollectionView;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


@interface PESDKFrameDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSourcePrefetching>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView prefetchItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView cancelPrefetchingForItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
@end


@interface PESDKFrameDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

enum FrameTileMode : NSInteger;

/// This class represents a group of the images.
SWIFT_CLASS_NAMED("FrameImageGroup")
@interface PESDKFrameImageGroup : NSObject
/// The image placed at the start.
@property (nonatomic, strong) UIImage * _Nullable startImage;
/// The image placed in the middle.
@property (nonatomic, strong) UIImage * _Nullable midImage;
/// The image placed at the end.
@property (nonatomic, strong) UIImage * _Nullable endImage;
/// The url of the image placed at the start.
@property (nonatomic, readonly, copy) NSURL * _Nullable startImageURL;
/// The url of the image placed in the middle.
@property (nonatomic, readonly, copy) NSURL * _Nullable midImageURL;
/// The url of the image placed at the end.
@property (nonatomic, readonly, copy) NSURL * _Nullable endImageURL;
/// The tiling mode for the image in the middle.
@property (nonatomic) enum FrameTileMode midImageMode;
/// The scale of the frame relative to the shorter side of the image.
@property (nonatomic) CGFloat relativeScale;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("For the upcoming serialization feature, it is required to save the URL. Therefore you wont be able to serialize the frame, unless you use init(startImageURL:midImageURL:endImageURL:).");
/// Creates a new instance of <code>CustomPatchFrameBuilder</code> for the images at the given urls.
/// \param startImageURL The url of the image placed at the start.
///
/// \param midImageURL The url of the image placed in the middle.
///
/// \param endImageURL The url of the image placed at the end.
///
- (nonnull instancetype)initWithStartImageURL:(NSURL * _Nullable)startImageURL midImageURL:(NSURL * _Nonnull)midImageURL endImageURL:(NSURL * _Nullable)endImageURL OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>FrameImageView</code> is currently just a dummy class. Its purpose is to find out if we are dealing with the frame view
/// during serialization.
SWIFT_CLASS_NAMED("FrameImageView")
@interface PESDKFrameImageView : UIImageView
/// The identifier of the currently used frame.
@property (nonatomic, copy) NSString * _Nonnull frameIdentifier;
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image highlightedImage:(UIImage * _Nullable)highlightedImage OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(ios,introduced=3.0);
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

/// Each patch consists of four groups. There are two basic layouts.
/// The first one places the top and bottom group above the full width of the image,
/// and the left and right group in between. The second layout works the other way around.
/// This enum determins, what groups will be placed ‘inside’.
typedef SWIFT_ENUM(NSInteger, FrameLayoutMode) {
/// Sets the horizontal groups inside.
  FrameLayoutModeHorizontalInside = 0,
/// Sets the vertical group inside.
  FrameLayoutModeVerticalInside = 1,
};

/// The overlay actions that can be used in an instance of <code>FrameToolController</code>.
/// <ul>
///   <li>
///     BringToFront:     Bring the frame to the front.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, FrameOverlayAction) {
/// Bring the frame to the front.
  FrameOverlayActionBringToFront = 0,
};

/// This enum is used to set the the tiling mode to strech or repeat.
typedef SWIFT_ENUM(NSInteger, FrameTileMode) {
/// When this mode is set, the tile is stretech to fit its rect.
  FrameTileModeStretch = 0,
/// When this mode is set, the tile is repeated to fit its rect.
  FrameTileModeRepeat = 1,
};


/// A <code>FrameToolController</code> is reponsible for displaying the UI to add a frame to an image.
SWIFT_CLASS_NAMED("FrameToolController")
@interface PESDKFrameToolController : PESDKStackLayoutToolController
/// The frame data source that is associated with this view controller.
@property (nonatomic, strong) PESDKFrameDataSource * _Nullable frameDataSource;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsDefaultPreviewView;
- (void)willBecomeActiveTool;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
/// :nodoc:
- (void)didResignActiveTool;
/// :nodoc:
- (void)photoEditModelDidChange;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)otherGestureRecognizer SWIFT_WARN_UNUSED_RESULT;
@end


/// This protocol is used to delegate show and hide commands to any view that
/// is able to display a progress view.
SWIFT_PROTOCOL_NAMED("ProgressViewDisplayer")
@protocol PESDKProgressViewDisplayer
/// Invokes a show command.
- (void)showProgressView;
/// Invokes a hide command.
- (void)hideProgressView;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKProgressViewDisplayer>
/// :nodoc:
- (void)showProgressView;
/// :nodoc:
- (void)hideProgressView;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKCropAndStraightenViewDelegate>
/// :nodoc:
- (void)cropAndStraightenViewWillBeginTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// :nodoc:
- (void)cropAndStraightenViewDidEndTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// :nodoc:
- (void)cropAndStraightenViewDidTrack:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
@end


@interface PESDKFrameToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


/// Options for configuring a <code>FrameToolController</code>.
SWIFT_CLASS_NAMED("FrameToolControllerOptions")
@interface PESDKFrameToolControllerOptions : PESDKToolControllerOptions
/// This closure is called when the user selects a frame. The closure is passed <code>nil</code> when no frame
/// was selected.
@property (nonatomic, readonly, copy) void (^ _Nullable selectedFrameClosure)(PESDKFrame * _Nullable);
/// This closure allows further customization of the ‘No Frame’ cell.
@property (nonatomic, readonly, copy) void (^ _Nullable noFrameCellConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull);
/// This closure allows further customization of the cells of a frame.
@property (nonatomic, readonly, copy) void (^ _Nullable frameCellConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKFrame * _Nonnull);
/// This closure is called when installing the frame data source. You can use it
/// to save a reference to the frame data source.
@property (nonatomic, readonly, copy) void (^ _Nullable frameDataSourceConfigurationClosure)(PESDKFrameDataSource * _Nonnull);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum FrameOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable frameOverlayActionSelectedClosure)(enum FrameOverlayAction);
/// Creates a newly allocated instance of <code>FrameToolControllerOptions</code> using the default builder.
- (nonnull instancetype)init;
/// Creates a newly allocated instance of <code>FrameToolControllerOptions</code> using the given builder.
/// \param builder A <code>FrameToolControllerOptionsBuilder</code> instance.
///
- (nonnull instancetype)initWithBuilder:(PESDKFrameToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>FrameToolControllerOptionsBuilder</code> for <code>FrameToolControllerOptions</code>.
SWIFT_CLASS_NAMED("FrameToolControllerOptionsBuilder")
@interface PESDKFrameToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure is called when the user selects a frame. The closure is passed <code>nil</code> when no frame
/// was selected.
@property (nonatomic, copy) void (^ _Nullable selectedFrameClosure)(PESDKFrame * _Nullable);
/// This closure allows further customization of the ‘No Frame’ cell.
@property (nonatomic, copy) void (^ _Nullable noFrameCellConfigurationClosure)(PESDKIconCaptionCollectionViewCell * _Nonnull);
/// This closure allows further customization of the cells of a frame.
@property (nonatomic, copy) void (^ _Nullable frameCellConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKFrame * _Nonnull);
/// This closure is called when installing the frame data source. You can use it
/// to save a reference to the frame data source.
@property (nonatomic, copy) void (^ _Nullable frameDataSourceConfigurationClosure)(PESDKFrameDataSource * _Nonnull);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum FrameOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, copy) void (^ _Nullable frameOverlayActionSelectedClosure)(enum FrameOverlayAction);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKFrameToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>FrameOverlayAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedFrameOverlayActions</code> with the corresponding <code>FrameOverlayAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedFrameOverlayActionsAsNSNumbers;
@end


/// A <code>Tool</code> is an abstract base class. Currently <code>FreehandTool</code> is the only concrete subclass and
/// it is used to handle touch events and draw primitives.
SWIFT_CLASS_NAMED("Tool")
@interface PESDKTool : NSObject
/// <code>true</code> if touch events occurred, <code>false</code> otherwise.
@property (nonatomic, readonly) BOOL moved;
/// Called at the beginning of a touch event.
/// \param recognizer The recognizer that recognized the event.
///
- (void)gestureBegan:(UIGestureRecognizer * _Nonnull)recognizer;
/// Called multiple times during a touch event.
/// \param recognizer The recognizer that recognized the event.
///
- (void)gestureMoved:(UIGestureRecognizer * _Nonnull)recognizer;
/// Called when a touch event ended.
/// \param recognizer The recognizer that recognized the event.
///
- (void)gestureEnded:(UIGestureRecognizer * _Nonnull)recognizer;
/// Called when a touch event canceled.
/// \param recognizer The recognizer that recognized the event.
///
- (void)gestureCanceled:(UIGestureRecognizer * _Nonnull)recognizer;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>FreehandTool</code> is responsible for creating vertices for a freehand drawing.
SWIFT_CLASS_NAMED("FreehandTool")
@interface PESDKFreehandTool : PESDKTool
/// The color that should be used for this drawing.
@property (nonatomic, strong) UIColor * _Nonnull color;
/// The hardness that should be used for this drawing. This value is just used to store the value within
/// the drawn paths. The actual stamp setting is done via brush generator. Since that is a fire and forget thing,
/// and we create the brush somewhere else, we use this to keep the information.
@property (nonatomic) CGFloat hardness;
/// The brush that should be used for this drawing.
@property (nonatomic, strong) PESDKBrush * _Nullable brush;
/// :nodoc:
- (void)gestureBegan:(UIGestureRecognizer * _Nonnull)recognizer;
/// This method starts a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
/// \param force The used force
///
- (void)beginPathWithLocation:(CGPoint)location force:(CGFloat)force;
/// :nodoc:
- (void)gestureMoved:(UIGestureRecognizer * _Nonnull)recognizer;
/// This method continues a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
/// \param canvas A canvas view.
///
/// \param force The used force
///
- (void)continuePathWithLocation:(CGPoint)location canvas:(PESDKCanvasView * _Nonnull)canvas force:(CGFloat)force;
/// :nodoc:
- (void)gestureEnded:(UIGestureRecognizer * _Nonnull)recognizer;
/// This method ends a path. It is used during the deserialization process to
/// recreate the brushes.
/// \param location The starting location.
///
/// \param canvas A canvas view.
///
/// \param didMove When this is set to false, the path consists of a single point only.
///
- (void)endPathWithLocation:(CGPoint)location canvas:(PESDKCanvasView * _Nonnull)canvas didMove:(BOOL)didMove;
/// :nodoc:
- (void)gestureCanceled:(UIGestureRecognizer * _Nonnull)recognizer;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end



/// A <code>GradientView</code> shows a linear gradient from its top to its bottom.
SWIFT_CLASS_NAMED("GradientView")
@interface PESDKGradientView : UIView
/// The top color of the gradient.
@property (nonatomic, readonly, strong) UIColor * _Nonnull topColor;
/// The bottom color of the gradient.
@property (nonatomic, readonly, strong) UIColor * _Nonnull bottomColor;
/// Creates a new gradient view.
/// \param topColor The color at the top of the view.
///
/// \param bottomColor The color at the bottom of the view.
///
- (nonnull instancetype)initWithTopColor:(UIColor * _Nonnull)topColor bottomColor:(UIColor * _Nonnull)bottomColor OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) Class _Nonnull layerClass;)
+ (Class _Nonnull)layerClass SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
@end


/// The <code>HandleButton</code> is used in the <code>TextFontToolController</code> to expand the <code>FontSelectorView</code>.
/// It is a standard <code>Button</code> that uses its <code>tintColor</code> as its <code>backgroundColor</code>.
SWIFT_CLASS_NAMED("HandleButton")
@interface PESDKHandleButton : PESDKButton
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
@end


/// An <code>IconBorderedCollectionViewCell</code> is a cell that shows a border around the cell and an image
/// in its center.
SWIFT_CLASS_NAMED("IconBorderedCollectionViewCell")
@interface PESDKIconBorderedCollectionViewCell : PESDKActivityBorderedCollectionViewCell
/// An image view in the center of the cell.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)prepareForReuse;
@end


/// An <code>IconCaptionCollectionViewCell</code> is a cell that shows an icon and a label.
SWIFT_CLASS_NAMED("IconCaptionCollectionViewCell")
@interface PESDKIconCaptionCollectionViewCell : UICollectionViewCell
/// An image view at the top of the cell.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// A label at the bottom of the cell.
@property (nonatomic, readonly, strong) UILabel * _Nonnull captionLabel;
/// The tint color to use for the icon when the cell is not selected
@property (nonatomic, strong) UIColor * _Nonnull iconTintColor;
/// The tint color to use for the caption when the cell is not selected
@property (nonatomic, strong) UIColor * _Nonnull captionTintColor;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// An icon generator can be used to generate various icons.
SWIFT_CLASS_NAMED("IconGenerator")
@interface PESDKIconGenerator : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// This class is out to provide an easy service to get images,
/// either from a local or remote source.
SWIFT_CLASS_NAMED("ImageProvider")
@interface PESDKImageProvider : NSObject
/// When the <code>ImageProvider</code> is used by a component that wants
/// to show a progress view this delegate is used to
/// inform the component that the progress view should be shown
/// or hidden.
@property (nonatomic, weak) id <PESDKProgressViewDisplayer> _Nullable progressViewDisplayer;
/// Get a collection of images.
/// \param urls URLs of the images.
///
/// \param completion A block that passes the images on sucess, or the errors otherwise.
///
- (void)getImagesFrom:(NSArray<NSURL *> * _Nonnull)urls completion:(SWIFT_NOESCAPE void (^ _Nonnull)(NSDictionary<NSURL *, UIImage *> * _Nullable, NSArray<NSError *> * _Nullable))completion;
/// Get a single image.
/// \param imageURL The URL of the image.
///
/// \param completion A completion block that passes the image on succsess or the error on failure.
///
- (void)getImageFrom:(NSURL * _Nonnull)imageURL completion:(void (^ _Nonnull)(UIImage * _Nullable, NSError * _Nullable))completion;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// This filter adds or takes away clarity of an image.
SWIFT_CLASS_NAMED("LUTFilter")
@interface PESDKLUTFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The LUT that should be applied.
@property (nonatomic, strong) CIImage * _Nullable inputLUT;
/// The number of tiles on the LUT image, in horizontal direction.
@property (nonatomic, strong) NSNumber * _Nullable inputHorizontalTileCount;
/// The number of tiles on the LUT image, in vertical direction.
@property (nonatomic, strong) NSNumber * _Nullable inputVerticalTileCount;
/// The effect intensity.
@property (nonatomic, strong) NSNumber * _Nullable inputIntensity;
/// The filtered image.
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>LabelBorderedCollectionViewCell</code> is a cell that shows a border around the cell and a label
/// in its center.
SWIFT_CLASS_NAMED("LabelBorderedCollectionViewCell")
@interface PESDKLabelBorderedCollectionViewCell : PESDKBorderedCollectionViewCell
/// A label in the center of the cell.
@property (nonatomic, readonly, strong) UILabel * _Nonnull textLabel;
/// The tint color to use for the caption when the cell is not selected
@property (nonatomic, strong) UIColor * _Nonnull textLabelTintColor;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// A <code>LabelCaptionCollectionViewCell</code> is a cell that displays two labels, one at the top and one at
/// the bottom.
SWIFT_CLASS_NAMED("LabelCaptionCollectionViewCell")
@interface PESDKLabelCaptionCollectionViewCell : UICollectionViewCell
/// A label near the top of the cell.
@property (nonatomic, readonly, strong) UILabel * _Nonnull label;
/// A label near the bottom of the cell.
@property (nonatomic, readonly, strong) UILabel * _Nonnull captionLabel;
/// The tint color to use for the label when the cell is not selected
@property (nonatomic, strong) UIColor * _Nonnull labelTintColor;
/// The tint color to use for the caption when the cell is not selected
@property (nonatomic, strong) UIColor * _Nonnull captionTintColor;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// A <code>LabelIconBorderedCollectionViewCell</code> extends a <code>LabelBorderedCollectionViewCell</code> by an image
/// view that displays an icon instead of the label when required.
SWIFT_CLASS_NAMED("LabelIconBorderedCollectionViewCell")
@interface PESDKLabelIconBorderedCollectionViewCell : PESDKLabelBorderedCollectionViewCell
/// An image view in the center of the cell.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull iconImageView;
/// Whether the icon is visible (and the label thus hidden) or not.
@property (nonatomic) BOOL isIconVisible;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)tintColorDidChange;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// Applies clarity to an instance of <code>CIImage</code>.
SWIFT_CLASS_NAMED("LegacyClarityFilter")
@interface PESDKLegacyClarityFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The intensity of this filter.
@property (nonatomic, strong) NSNumber * _Nullable inputIntensity;
/// :nodoc:
- (void)setDefaults;
/// :nodoc:
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>LicenseModel</code> represents all properties of a license.
SWIFT_CLASS("_TtC14PhotoEditorSDK12LicenseModel")
@interface LicenseModel : NSObject
/// The owner of the license.
@property (nonatomic, readonly, copy) NSString * _Nonnull owner;
/// The license’s signature.
@property (nonatomic, readonly, copy) NSString * _Nonnull signature;
/// The app identifier that is registered with the license.
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull appIdentifier;
/// The platform of this license.
@property (nonatomic, readonly, copy) NSString * _Nonnull platform;
/// Whether or not the license is an enterprise license.
@property (nonatomic, readonly) BOOL isEnterpriseLicense;
/// The API token that belongs to this license.
@property (nonatomic, readonly, copy) NSString * _Nonnull apiToken;
/// A list of server domains that this license sends API requests to.
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull domains;
/// The version of the license.
@property (nonatomic, readonly, copy) NSString * _Nonnull licenseVersion;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

@class NSValue;

/// Applies a radial focus to an instance of <code>CIImage</code>.
SWIFT_CLASS_NAMED("LinearFocusFilter")
@interface PESDKLinearFocusFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The first normalized control point of the focus. This control point should use the coordinate system of Core Image, which means that (0,0) is at the top left.
@property (nonatomic, strong) NSValue * _Nullable inputNormalizedControlPoint1;
/// The second normalized control point of the focus. This control point should use the coordinate system of Core Image, which means that (0,0) is at the top left.
@property (nonatomic, strong) NSValue * _Nullable inputNormalizedControlPoint2;
/// The blur radius to use for focus. Default is 10.
@property (nonatomic, strong) NSNumber * _Nullable inputRadius;
/// The fade width to use for focus. Default is 0.
@property (nonatomic, strong) NSNumber * _Nullable inputNormalizedFadeWidth;
/// The quality that should be used. Low should be used only during preview.
@property (nonatomic) enum BlurQuality inputBlurQuality;
/// :nodoc:
- (void)setDefaults;
/// :nodoc:
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

/// The log level determins what messages should be logged. For example
/// if the log level is set to <code>warn</code>, messages classified as <code>info</code> wont be logged.
typedef SWIFT_ENUM(NSInteger, LogLevel) {
/// Nothing should be logged.
  LogLevelNone = 0,
/// Only errors should be logged.
  LogLevelError = 1,
/// Warnings and errors should be logged.
  LogLevelWarn = 2,
/// Infos, warnings, and errors should be logged.
  LogLevelInfo = 3,
/// Degug messages, infos, warnings and errors should be logged.
  LogLevelDebug = 4,
/// Traces, debug messages, infos, warnings and errors should be logged.
  LogLevelTrace = 5,
};



/// The <code>MasterLogger</code> manages and deploys loggers. That means it holds all instances of loggers, and delegates incoming log messages to each of them.
/// Also it takes case of threading, to keep logging efficient. More loggers can be added using the <code>add</code> method.
/// All child loggers must implement the <code>LoggerProtocol</code>.
SWIFT_CLASS_NAMED("MasterLogger")
@interface PESDKLogger : NSObject
/// The log level determins what kind of logs will be performed. See <code>LogLevel</code> for details.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) enum LogLevel logLevel;)
+ (enum LogLevel)logLevel SWIFT_WARN_UNUSED_RESULT;
+ (void)setLogLevel:(enum LogLevel)value;
/// Determins if the <code>MasterLogger</code> works synchronously or asynchronously.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL async;)
+ (BOOL)async SWIFT_WARN_UNUSED_RESULT;
+ (void)setAsync:(BOOL)value;
/// :nodoc:
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Use this function to add your own logger.
/// \param logger A logger.
///
+ (void)addWithLogger:(id <PESDKLoggerProtocol> _Nonnull)logger;
/// Remove a logger.
/// \param logger The logger that should be removed.
///
+ (void)removeWithLogger:(id <PESDKLoggerProtocol> _Nonnull)logger;
/// Removed all loggers.
+ (void)removeAll;
/// Logs an error.
/// \param message A message.
///
+ (void)error:(NSString * _Nonnull)message;
/// Logs a warning.
/// \param message A message.
///
+ (void)warn:(NSString * _Nonnull)message;
/// Logs an info level message.
/// \param message A message.
///
+ (void)info:(NSString * _Nonnull)message;
/// Logs a debug level message.
/// \param message A message.
///
+ (void)debug:(NSString * _Nonnull)message;
/// Logs a trace level message.
/// \param message A message.
///
+ (void)trace:(NSString * _Nonnull)message;
@end

@class UICollectionViewFlowLayout;

/// A <code>MenuCollectionView</code> is a subclass of <code>UICollectionView</code> configured to be used as the menu
/// of a tool controller.
SWIFT_CLASS_NAMED("MenuCollectionView")
@interface PESDKMenuCollectionView : UICollectionView
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// The flow layout of the collection view.
@property (nonatomic, readonly, strong) UICollectionViewFlowLayout * _Nonnull flowLayout;
- (nonnull instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout * _Nonnull)layout SWIFT_UNAVAILABLE;
@end


/// A <code>ModeCollectionViewCell</code> is a cell that displays a label within a frame
SWIFT_CLASS("_TtC14PhotoEditorSDK22ModeCollectionViewCell")
@interface ModeCollectionViewCell : UICollectionViewCell
/// A label near the top of the cell.
@property (nonatomic, readonly, strong) UILabel * _Nonnull label;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end

@protocol PESDKModeSelectionViewDelegate;

/// A <code>ModeSelectionView</code> is a subclass of <code>UICollectionView</code> configured to be used as the menu
/// of a tool controller.
SWIFT_CLASS("_TtC14PhotoEditorSDK17ModeSelectionView")
@interface ModeSelectionView : UIView
/// This delegate is used to inform a UI component when a new blend mode is selected.
@property (nonatomic, weak) id <PESDKModeSelectionViewDelegate> _Nullable selectionDelegate;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// The flow layout of the collection view.
@property (nonatomic, readonly, strong) UICollectionViewFlowLayout * _Nonnull flowLayout;
@end


@interface ModeSelectionView (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface ModeSelectionView (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface ModeSelectionView (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// This delegate is used to inform a UI component when a new blend mode is selected.
SWIFT_PROTOCOL_NAMED("ModeSelectionViewDelegate")
@protocol PESDKModeSelectionViewDelegate
/// This is called when a new blend mode got selected.
- (void)selectedWithMode:(enum PESDKBlendMode)mode;
@end


@interface NSError (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface NSMutableData (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface NSObject (SWIFT_EXTENSION(PhotoEditorSDK))
@end

/// Represents the orientation of an image and has the same meaning as the corresponding EXIF value.
typedef SWIFT_ENUM_NAMED(NSInteger, PESDKOrientation, "Orientation") {
/// Row 0 is at the top, column 0 is on the left.
  PESDKOrientationNormal = 1,
/// Row 0 is at the top, column 0 is on the right.
  PESDKOrientationFlipX = 2,
/// Row 0 is at the bottom, column 0 is on the right.
  PESDKOrientationRotate180 = 3,
/// Row 0 is at the bottom, column 0 is on the left.
  PESDKOrientationFlipY = 4,
/// Row 0 is on the left, column 0 is at the top.
  PESDKOrientationTransverse = 5,
/// Row 0 is on the right, column 0 is at the top.
  PESDKOrientationRotate90 = 6,
/// Row 0 is on the right, column 0 is at the bottom.
  PESDKOrientationTranspose = 7,
/// Row 0 is on the left, column 0 is at the bottom.
  PESDKOrientationRotate270 = 8,
};


/// An <code>Overlay</code> represents a unique overlay that can be added to a photo.
SWIFT_CLASS_NAMED("Overlay")
@interface PESDKOverlay : NSObject
/// This string is used to identify the overlay, it must be unique.
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier;
/// The URL of the image.
@property (nonatomic, readonly, copy) NSURL * _Nullable url;
/// The URL of the thumbnail for this overlay. If none is provided,
/// the <code>url</code> will be used.
@property (nonatomic, readonly, copy) NSURL * _Nullable thumbnailURL;
/// This string will be used within the UI.
@property (nonatomic, readonly, copy) NSString * _Nonnull displayName;
/// The actual image of the asset.
@property (nonatomic, readonly, strong) CIImage * _Nullable image;
/// This mode will be set when the overlay is selected in the UI.
@property (nonatomic, readonly) enum PESDKBlendMode initialBlendMode;
/// Initialize a new Overlay
/// \param identifier An identifier.
///
/// \param displayName This will be used within the UI.
///
/// \param url The URL of the image.
///
/// \param thumbnailURL The URL of the thumbnail for this overlay. If none is provided,
/// the <code>url</code> will be used.
///
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier displayName:(NSString * _Nonnull)displayName url:(NSURL * _Nullable)url thumbnailURL:(NSURL * _Nullable)thumbnailURL initialBlendMode:(enum PESDKBlendMode)initialBlendMode OBJC_DESIGNATED_INITIALIZER;
/// Get the overlay from the pool with the given identifier.
/// \param identifier An identifier.
///
///
/// returns:
/// The overlay that matches the identifier, <code>nil</code> otherwise.
+ (PESDKOverlay * _Nullable)overlayWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT;
/// This is a special case of an overlay. It means, apply no overlay at all.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKOverlay * _Nonnull none;)
+ (PESDKOverlay * _Nonnull)none SWIFT_WARN_UNUSED_RESULT;
/// This array represents the pool of overlays available to the SDK.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSArray<PESDKOverlay *> * _Nonnull all;)
+ (NSArray<PESDKOverlay *> * _Nonnull)all SWIFT_WARN_UNUSED_RESULT;
+ (void)setAll:(NSArray<PESDKOverlay *> * _Nonnull)value;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// An <code>OverlayButton</code> is used inside the <code>workspaceView</code> of a <code>StackLayoutToolController</code>. It is
/// a regular button with a translucent black background.
SWIFT_CLASS_NAMED("OverlayButton")
@interface PESDKOverlayButton : PESDKButton
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
@property (nonatomic, readonly) CGSize intrinsicContentSize;
/// Creates the default add button.
///
/// returns:
/// The default add button.
+ (PESDKOverlayButton * _Nonnull)makeAddButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default delete button.
///
/// returns:
/// The default delete button.
+ (PESDKOverlayButton * _Nonnull)makeDeleteButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default flip button.
///
/// returns:
/// The default flip button.
+ (PESDKOverlayButton * _Nonnull)makeFlipButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default straighten button.
///
/// returns:
/// The default straighten button.
+ (PESDKOverlayButton * _Nonnull)makeStraightenButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default bring to front button.
///
/// returns:
/// The default bring to front button.
+ (PESDKOverlayButton * _Nonnull)makeToFrontButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default undo button.
///
/// returns:
/// The default undo button.
+ (PESDKOverlayButton * _Nonnull)makeUndoButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default redo button.
///
/// returns:
/// The default redo button.
+ (PESDKOverlayButton * _Nonnull)makeRedoButton SWIFT_WARN_UNUSED_RESULT;
/// Creates the default alignment button.
///
/// returns:
/// The default alignment button.
+ (PESDKOverlayButton * _Nonnull)makeAlignmentButton SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>OverlaySelectionController</code> contains everything that is needed to display a list of available overlays.
SWIFT_CLASS_NAMED("OverlaySelectionController")
@interface PESDKOverlaySelectionController : NSObject
/// The collection view that presents all available overlays.
@property (nonatomic, readonly, strong) UICollectionView * _Nonnull collectionView;
/// This block is called when a new overlay is selected.
@property (nonatomic, copy) void (^ _Nullable selectedBlock)(PESDKOverlay * _Nonnull);
/// This block is used to determine the currently applied overlay.
@property (nonatomic, copy) PESDKOverlay * _Nullable (^ _Nullable activeOverlayBlock)(void);
/// This block is used to configure the overlay collection view cell.
@property (nonatomic, copy) void (^ _Nullable cellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKOverlay * _Nonnull);
/// Creates a newly allocated instance of a <code>OverlaySelectionController</code> using the given input image.
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Updates the cell selection based on the <code>activeOverlayBlock</code>.
/// \param animated If <code>true</code> the selection will be animated.
///
- (void)updateSelectionWithAnimated:(BOOL)animated;
@end


@interface PESDKOverlaySelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKOverlaySelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKOverlaySelectionController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>OverlayToolController</code> is reponsible for displaying the UI to apply a overlay to an image.
SWIFT_CLASS_NAMED("OverlayToolController")
@interface PESDKOverlayToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
- (void)photoEditModelDidChange;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKOverlayToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKModeSelectionViewDelegate>
/// :nodoc:
- (void)selectedWithMode:(enum PESDKBlendMode)mode;
@end


@interface PESDKOverlayToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


/// Options for configuring a <code>OverlayToolController</code>.
SWIFT_CLASS_NAMED("OverlayToolControllerOptions")
@interface PESDKOverlayToolControllerOptions : PESDKToolControllerOptions
/// This closure can be used to configure the overlay intensity slider.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the overlay intensity slider’s container view.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayIntensitySliderContainerConfigurationClosure)(UIView * _Nonnull);
/// Enable/Disable the overlay intensity slider. Defaults to true.
@property (nonatomic, readonly) BOOL showOverlayIntensitySlider;
/// Enable/Disable the overlay blend mode selection view. Defaults to true.
@property (nonatomic, readonly) BOOL showModeSelectionView;
/// This closure is called every time the user selects a overlay.
@property (nonatomic, readonly, copy) void (^ _Nullable overlaySelectedClosure)(PESDKOverlay * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the
/// selected instance of <code>Overlay</code> will be passed as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayIntensityChangedClosure)(PESDKSlider * _Nonnull, PESDKOverlay * _Nonnull);
/// This closure allows further configuration of the overlay cells. The closure is called for
/// each filter cell and has the cell and its corresponding instance of <code>Overlay</code> as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayCellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKOverlay * _Nonnull);
/// This closure allows further configuration of the mode selection view.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayModeSelectionViewConfigurationClosure)(ModeSelectionView * _Nonnull);
/// This closure allows further configuration of the mode selection cell.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayModeSelectionCellConfigurationClosure)(ModeCollectionViewCell * _Nonnull);
/// Returns a newly allocated instance of a <code>OverlayToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>OverlayToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>OverlayToolControllerOptions</code> using the given builder.
/// \param builder A <code>OverlayToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>OverlayToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKOverlayToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>OverlayToolControllerOptionsBuilder</code> for <code>OverlayToolControllerOptions</code>.
SWIFT_CLASS_NAMED("OverlayToolControllerOptionsBuilder")
@interface PESDKOverlayToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure can be used to configure the overlay intensity slider.
@property (nonatomic, copy) void (^ _Nullable overlayIntensitySliderConfigurationClosure)(PESDKSlider * _Nonnull);
/// This closure can be used to configure the overlay intensity slider’s container view.
@property (nonatomic, copy) void (^ _Nullable overlayIntensitySliderContainerConfigurationClosure)(UIView * _Nonnull);
/// Enable/Disable the overlay intensity slider. Defaults to true.
@property (nonatomic) BOOL showOverlayIntensitySlider;
/// The intensity that should be initialy applied to a overlay when selecting it. Defaults to 75 %.
@property (nonatomic) CGFloat initialOverlayIntensity;
/// This closure is called every time the user selects a overlay.
@property (nonatomic, copy) void (^ _Nullable overlaySelectedClosure)(PESDKOverlay * _Nonnull);
/// This closure will be called whenever the value of the slider changes. The <code>Slider</code> and the
/// selected instance of <code>Overlay</code> will be passed as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayIntensityChangedClosure)(PESDKSlider * _Nonnull, PESDKOverlay * _Nonnull);
/// Enable/Disable the overlay blend mode selection view. Defaults to true.
@property (nonatomic) BOOL showModeSelectionView;
/// This closure allows further configuration of the overlay cells. The closure is called for
/// each filter cell and has the cell and its corresponding instance of <code>Overlay</code> as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayCellConfigurationClosure)(PESDKFilterCollectionViewCell * _Nonnull, PESDKOverlay * _Nonnull);
/// This closure allows further configuration of the mode selection view.
@property (nonatomic, copy) void (^ _Nullable overlayModeSelectionViewConfigurationClosure)(ModeSelectionView * _Nonnull);
/// This closure allows further configuration of the mode selection cell.
@property (nonatomic, copy) void (^ _Nullable overlayModeSelectionCellConfigurationClosure)(ModeCollectionViewCell * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// :nodoc:
SWIFT_CLASS("_TtC14PhotoEditorSDK5PESDK")
@interface PESDK : NSObject
/// Unlocks the SDK with the given license. Calling this method prior to using any parts of the
/// SDK is required and will be enforced in future versions.
/// \param url The file url where the license file is located.
///
///
/// returns:
/// Whether or not the controller was successfully unlocked.
+ (void)unlockWithLicenseAt:(NSURL * _Nonnull)url;
/// PhotoEditor SDK analytics instance. All screen views and events are logged with this instance.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) PESDKAnalytics * _Nonnull analytics;)
+ (PESDKAnalytics * _Nonnull)analytics SWIFT_WARN_UNUSED_RESULT;
/// The progress view that is being used to display progress. You can provide your own progress
/// view as long as it adopts the <code>ProgressView</code> protocol.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id <PESDKProgressView> _Nonnull progressView;)
+ (id <PESDKProgressView> _Nonnull)progressView SWIFT_WARN_UNUSED_RESULT;
+ (void)setProgressView:(id <PESDKProgressView> _Nonnull)value;
/// Allows to set a custom dictionary that contains dictionaries with language locales.
/// Will override localization found in the bundle, if a value is found.bundle
/// Falls back to “en” if localization key is not found in dictionary.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> * _Nullable localizationDictionary;)
+ (NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> * _Nullable)localizationDictionary SWIFT_WARN_UNUSED_RESULT;
+ (void)setLocalizationDictionary:(NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> * _Nullable)value;
/// Register a custom block that handles translation.block
/// If this block is <code>nil</code>, the PhotoEditorSDK.bundle + localizationDict will be used.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSString * _Nullable (^ _Nullable localizationBlock)(NSString * _Nonnull);)
+ (NSString * _Nullable (^ _Nullable)(NSString * _Nonnull))localizationBlock SWIFT_WARN_UNUSED_RESULT;
+ (void)setLocalizationBlock:(NSString * _Nullable (^ _Nullable)(NSString * _Nonnull))value;
/// Register a custom block that returns custom images for the given image name.
/// If this block is <code>nil</code>, the image from the PhotoEditorSDK.bundle will be used.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) UIImage * _Nullable (^ _Nullable bundleImageBlock)(NSString * _Nonnull);)
+ (UIImage * _Nullable (^ _Nullable)(NSString * _Nonnull))bundleImageBlock SWIFT_WARN_UNUSED_RESULT;
+ (void)setBundleImageBlock:(UIImage * _Nullable (^ _Nullable)(NSString * _Nonnull))value;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKTexture;

/// A <code>Painting</code> manages the shaders, textures, vertices and framebuffers involved in a single painting.
SWIFT_CLASS_NAMED("Painting")
@interface PESDKPainting : NSObject
/// The canvas view that displays this painting.
@property (nonatomic, weak) PESDKCanvasView * _Nullable canvas;
/// The size of the painting.
@property (nonatomic, readonly) CGSize dimensions;
/// The bounds of the painting.
@property (nonatomic, readonly) CGRect bounds;
/// The context that this painting belongs to.
@property (nonatomic, readonly, strong) EAGLContext * _Nonnull context;
/// The VAO that covers this painting.
@property (nonatomic, readonly) GLuint quadVAO;
/// The brush texture that will be used to paint strokes.
@property (nonatomic, strong) PESDKTexture * _Nullable brushTexture;
/// An undo manager that can be used to undo drawing operations.
@property (nonatomic, strong) PESDKUndoController * _Nullable undoController;
/// Returns a newly initialized painting of the given size.
/// \param size The size of the painting.
///
///
/// returns:
/// A newly initialized <code>Painting</code> object.
- (nonnull instancetype)initWithSize:(CGSize)size OBJC_DESIGNATED_INITIALIZER;
/// Clears the painting of any drawings.
- (void)clear;
/// Preloads the texture that will be used to render drawings into.
- (void)preloadPaintTexture;
/// Generates an image of the painting of the given size and with the given background color.
/// \param size The size of the requested image.
///
/// \param color The background color of the image.
///
///
/// returns:
/// An image of the painting.
- (UIImage * _Nullable)imageWithSize:(CGSize)size backgroundColor:(UIColor * _Nonnull)color SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

/// The overlay actions that can be used in an instance of <code>PhotoEditViewControllerOptions</code>.
/// <ul>
///   <li>
///     Undo:             Undo the latest operation.
///   </li>
///   <li>
///     Redo:             Redo the latest operation.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, PhotoEditOverlayAction) {
/// Undo the latest operation.
  PhotoEditOverlayActionUndo = 0,
/// Redo the latest operation.
  PhotoEditOverlayActionRedo = 1,
};


/// A <code>PhotoEditRenderer</code> takes a <code>CIImage</code> and a <code>PhotoEditModel</code> as input and takes care of
/// applying all necessary effects and filters to the image. The output image can then be rendered
/// into an <code>EAGLContext</code> or converted into a <code>CGImage</code> instance.
SWIFT_CLASS_NAMED("PhotoEditRenderer")
@interface PESDKPhotoEditRenderer : NSObject
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable originalImage;
/// The render mode describes which effects should be applied to the input image.
@property (nonatomic) PESDKRenderMode renderMode;
/// A <code>CIImage</code> instance with all effects and filters applied to it.
@property (nonatomic, readonly, strong) CIImage * _Nonnull outputImage;
/// The size of the output image.
@property (nonatomic, readonly) CGSize outputImageSize;
/// Applies all necessary filters and effects to the input image and converts it to an instance
/// of <code>CGImage</code>.
///
/// returns:
/// A newly created instance of <code>CGImage</code>.
- (CGImageRef _Nonnull)newOutputImage SWIFT_WARN_UNUSED_RESULT;
/// Same as <code>newOutputImage()</code> but asynchronously.
/// \param completion A completion handler that receives the newly created instance of
/// <code>CGImage</code> once rendering is complete.
///
- (void)createOutputImageWithCompletion:(void (^ _Nonnull)(CGImageRef _Nonnull))completion;
/// Applies all necessary filters and effects to the input image and converts it to an instance
/// of <code>NSData</code> with the given compression quality.
/// \param compressionQuality The compression quality to apply.
///
/// \param metadataSourceImageURL An url to the original image of which the metadata
/// should be copied to the new image.
///
/// \param completionHandler A completion handler that receives the newly created
/// instance of <code>NSData</code> once rendering is complete.
///
- (void)generateOutputImageDataWithCompressionQuality:(CGFloat)compressionQuality metadataSourceImageURL:(NSURL * _Nullable)metadataSourceImageURL completionHandler:(void (^ _Nonnull)(NSData * _Nullable, CGFloat, CGFloat))completionHandler;
/// Draws the output image into the given <code>EAGLContext</code>.
/// \param context An instance of <code>EAGLContext</code> to draw into.
///
/// \param rect The <code>CGRect</code> in which the output image should be drawn.
///
/// \param viewportWidth The width of the view that displays the framebuffer’s content.
///
/// \param viewportHeight The height of the view that displays the framebuffer’s content.
///
- (void)drawOutputImageInContext:(EAGLContext * _Nonnull)context toRect:(CGRect)rect viewportWidth:(NSInteger)viewportWidth viewportHeight:(NSInteger)viewportHeight;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@class PESDKPhotoEditModel;

@interface PESDKPhotoEditRenderer (SWIFT_EXTENSION(PhotoEditorSDK))
/// The photo edit model that describes all effects that should be applied to the input image.
@property (nonatomic, strong) PESDKPhotoEditModel * _Nonnull objcPhotoEditModel;
@end



@interface PESDKPhotoEditToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end

@class PESDKSpriteController;

/// The <code>PhotoEditToolControllerDelegate</code> protocol defines methods that allow you respond to the events of an instance of <code>PhotoEditToolController</code>.
SWIFT_PROTOCOL_NAMED("PhotoEditToolControllerDelegate")
@protocol PESDKPhotoEditToolControllerDelegate
/// The photo edit renderer that is being used.
/// \param photoEditToolController The photo edit tool controller that is asking for the renderer.
///
///
/// returns:
/// An instance of <code>PhotoEditRenderer</code>.
- (PESDKPhotoEditRenderer * _Nullable)photoEditToolControllerMainRenderer:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// The base image that is being edited.
/// \param photoEditToolController The photo edit tool controller that is asking for the base image.
///
///
/// returns:
/// An instance of <code>UIImage</code>.
- (UIImage * _Nullable)photoEditToolControllerBaseImage:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// The base CIImage that is being edited.
/// \param photoEditToolController The photo edit tool controller that is asking for the base image.
///
///
/// returns:
/// An instance of <code>CIImage</code>.
- (CIImage * _Nullable)photoEditToolControllerBaseCIImage:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// The preview view that shows the edited image.
/// \param photoEditToolController The photo edit tool controller that is asking for the preview view.
///
///
/// returns:
/// An instance of <code>UIView</code>.
- (UIView * _Nullable)photoEditToolControllerPreviewView:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// The scrolling container that hosts the preview view.
/// \param photoEditToolController The photo edit tool controller that is asking for the scrolling container.
///
///
/// returns:
/// An instance of <code>UIScrollView</code>.
- (UIScrollView * _Nullable)photoEditToolControllerPreviewViewScrollingContainer:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// Called when the tool finishes editing.
/// \param photoEditToolController The photo edit view controller that finished editing.
///
- (void)photoEditToolControllerDidFinish:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// Called when the tool discards its changes.
/// \param photoEditToolController The photo edit tool controller that discarded its changes.
///
- (void)photoEditToolControllerDidCancel:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// Called when the tool updates its photo edit model.
/// \param photoEditToolController The photo edit tool controller that updated its photo edit model.
///
- (void)photoEditToolControllerDidUpdatePhotoEditModel:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// Called when the tool changes its preferred rendering mode.
/// \param photoEditToolController The photo edit tool controller that changed its preferred rendering mode.
///
- (void)photoEditToolControllerDidChangePreferredRenderMode:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// Called when the tool changes whether or not it wants a default preview.
/// \param photoEditToolController The photo edit tool controller that changed whether or not the default preview should be visible.
///
- (void)photoEditToolControllerDidChangeWantsDefaultPreviewView:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// Called when the tool changes its preferred preview view insets.
/// \param photoEditToolController The photo edit tool controller that updated its photo edit model.
///
/// \param animated Whether or not to animate this change.
///
- (void)photoEditToolController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController didChangePreferredPreviewViewInsetsAnimated:(BOOL)animated;
/// Called when the tool wants to present another tool on top of it.
/// \param photoEditToolController The photo edit tool controller that wants to present another tool.
///
/// \param toolController The tool that should be presented.
///
- (void)photoEditToolController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController didSelectToolController:(PESDKPhotoEditToolController * _Nonnull)toolController;
/// The overlay controller that manages overlays and hosts the overlay container view.
/// \param photoEditToolController The photo edit tool controller that is asking for the controller.
///
///
/// returns:
/// An sprite controller.
- (PESDKSpriteController * _Nullable)photoEditToolControllerSpriteController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
@end

@class NSData;

/// A <code>PhotoEditViewController</code> is responsible for presenting and rendering an edited image.
SWIFT_CLASS_NAMED("PhotoEditViewController")
@interface PESDKPhotoEditViewController : UIViewController
/// The scroll view that hosts the preview view.
@property (nonatomic, readonly, strong) UIScrollView * _Nullable previewViewScrollingContainer;
/// The preview view that renders the preview image.
@property (nonatomic, readonly, strong) GLKView * _Nullable mainPreviewView;
/// Set this property to the value returned by <code>serializedSettings</code> to restore those serialized
/// settings. This needs to be set before presenting the view controller. Setting this at a later
/// time results in undefined behavior.
@property (nonatomic, strong) NSData * _Nullable initialSerializedSettings;
/// The toolbar item for this controller.
/// seealso:
/// <code>ToolbarItem</code>.
@property (nonatomic, readonly, strong) PESDKToolbarItem * _Nonnull toolbarItem;
/// The <code>UndoController</code> associated with this photo edit view controller. This instance is
/// automatically passed to the tool controllers.
@property (nonatomic, strong) PESDKUndoController * _Nonnull undoController;
/// The controller that manages sprites and hosts the sprite container view.
@property (nonatomic, readonly, strong) PESDKSpriteController * _Nullable spriteController;
/// The identifier of the photo effect to apply to the photo immediately. This is useful if you
/// pass a photo that already has an effect applied by the <code>CameraViewController</code>. Note that you
/// must set this property before presenting the view controller.
@property (nonatomic, copy) NSString * _Nullable initialPhotoEffectIdentifier;
/// The delegate for this photo edit view controller. You should set this delegate to respond to
/// save events and errors.
@property (nonatomic, weak) id <PESDKPhotoEditViewControllerDelegate> _Nullable delegate;
/// The currently active tool controller, if any.
@property (nonatomic, readonly, strong) PESDKPhotoEditToolController * _Nullable activeTool;
/// Creates a newly initialized photo edit view controller for the given data object with a
/// default configuration. The data object should represent an image either in JPG or PNG
/// format. Use this initializer to preserve EXIF data.
/// \param data The data of the photo to edit, either in JPG or PNG format.
///
- (nonnull instancetype)initWithData:(NSData * _Nonnull)data;
/// Creates a newly initialized photo edit view controller for the given photo with a default
/// configuration.
/// \param photo The photo to edit.
///
- (nonnull instancetype)initWithPhoto:(UIImage * _Nonnull)photo;
/// Creates a newly initialized photo edit view controller for the given photo with the given
/// configuration options.
/// \param photo The photo to edit.
///
/// \param configuration The configuration options to apply.
///
- (nonnull instancetype)initWithPhoto:(UIImage * _Nonnull)photo configuration:(PESDKConfiguration * _Nonnull)configuration;
/// Creates a newly initialized photo edit view controller for the given data object with the
/// given configuration. The data object should represent an image either in JPG or PNG
/// format. Use this initializer to preserve EXIF data.
/// \param data The data of the photo to edit, either in JPG or PNG format.
///
/// \param configuration The configuration options to apply.
///
- (nonnull instancetype)initWithData:(NSData * _Nonnull)data configuration:(PESDKConfiguration * _Nonnull)configuration;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle;
/// :nodoc:
@property (nonatomic, readonly) BOOL prefersStatusBarHidden;
/// :nodoc:
- (void)updateViewConstraints;
/// Applies all changes to the photo and passes the edited image to the <code>delegate</code>.
/// \param sender The object that initiated the request.
///
- (void)save:(id _Nullable)sender;
/// Discards all changes to the photo and calls the <code>delegate</code>.
/// \param sender The object that initiated the request.
///
- (void)cancel:(id _Nullable)sender;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <GLKViewDelegate>
/// :nodoc:
- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect;
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (CGSize)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView willDisplayCell:(UICollectionViewCell * _Nonnull)cell forItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end

@class PESDKMenuItem;

@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK))
/// Creates a photo edit view controller with the given boxed menu items.
/// This initializer should only be used with Objective-C.
/// \param photo The photo to edit.
///
/// \param menuItems The menu items to display.
///
/// \param configuration The configuration options to apply.
///
- (nonnull instancetype)initWithPhoto:(UIImage * _Nonnull)photo menuItems:(NSArray<PESDKMenuItem *> * _Nonnull)menuItems configuration:(PESDKConfiguration * _Nonnull)configuration;
/// The intensity of the photo effect that is applied to the photo immediately. See
/// <code>initialPhotoEffectIdentifier</code> for more information.
@property (nonatomic, strong) NSNumber * _Nullable initialPhotoEffectIntensityAsNSNumber;
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIScrollViewDelegate>
/// :nodoc:
- (void)scrollViewDidZoom:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewDidEndZooming:(UIScrollView * _Nonnull)scrollView withView:(UIView * _Nullable)view atScale:(CGFloat)scale;
/// :nodoc:
- (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT;
/// Returns a JSON as NSData, that contains all the settings regarding the rendering.
/// I.e. what filter has been selected, what stickers were added and such.
@property (nonatomic, readonly, strong) NSData * _Nullable serializedSettings;
@end


@interface PESDKPhotoEditViewController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKPhotoEditToolControllerDelegate>
/// :nodoc:
- (PESDKPhotoEditRenderer * _Nullable)photoEditToolControllerMainRenderer:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UIImage * _Nullable)photoEditToolControllerBaseImage:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (CIImage * _Nullable)photoEditToolControllerBaseCIImage:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UIScrollView * _Nullable)photoEditToolControllerPreviewViewScrollingContainer:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UIView * _Nullable)photoEditToolControllerPreviewView:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)photoEditToolControllerDidFinish:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// :nodoc:
- (void)photoEditToolControllerDidCancel:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// :nodoc:
- (void)photoEditToolControllerDidUpdatePhotoEditModel:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// :nodoc:
- (void)photoEditToolControllerDidChangePreferredRenderMode:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// :nodoc:
- (void)photoEditToolControllerDidChangeWantsDefaultPreviewView:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController;
/// :nodoc:
- (void)photoEditToolController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController didChangePreferredPreviewViewInsetsAnimated:(BOOL)animated;
/// :nodoc:
- (void)photoEditToolController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController didSelectToolController:(PESDKPhotoEditToolController * _Nonnull)toolController;
/// :nodoc:
- (PESDKSpriteController * _Nullable)photoEditToolControllerSpriteController:(PESDKPhotoEditToolController * _Nonnull)photoEditToolController SWIFT_WARN_UNUSED_RESULT;
@end



/// Options for configuring a <code>PhotoEditViewController</code>.
SWIFT_CLASS_NAMED("PhotoEditViewControllerOptions")
@interface PESDKPhotoEditViewControllerOptions : NSObject
/// A configuration closure to configure the toolbars title view.
@property (nonatomic, readonly, copy) void (^ _Nullable titleViewConfigurationClosure)(UIView * _Nonnull);
/// The main view’s background color. Defaults to the configuration’s global background color.
@property (nonatomic, readonly, strong) UIColor * _Nullable backgroundColor;
/// The background color of the accessory view. Defaults to the configuration’s global background color.
@property (nonatomic, readonly, strong) UIColor * _Nullable accessoryViewBackgroundColor;
/// A configuration closure to configure the apply button displayed at the bottom right.
/// Defaults to a checkmark icon.
@property (nonatomic, readonly, copy) void (^ _Nullable applyButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// A configuration closure to configure the discard button displayed at the bottom left.
/// Defaults to a cross icon.
@property (nonatomic, readonly, copy) void (^ _Nullable discardButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Controls if the user can zoom the preview image. Defaults to <code>true</code>.
@property (nonatomic, readonly) BOOL allowsPreviewImageZoom;
/// Sets the frame scaling behaviour. Defaults to <code>.ScaleAspectFit</code>.
@property (nonatomic, readonly) UIViewContentMode frameScaleMode;
/// When set to <code>true</code>, the user is forced to crop the photo to one of the allowed crop aspects
/// in <code>TransformToolControllerOptions.allowedCropAspects</code> before being able to use other
/// features of the editor. The transform tool will only be presented if the image does not
/// already fit one of those allowed aspect ratios. It will be presented automatically, if the
/// user changes the orientation of the photo and the resulting image does not match an allowed
/// aspect ratio. Defaults to <code>false</code>.
/// attention:
/// This property has no effect unless <code>TransformToolControllerOptions.allowFreeCrop</code>
/// is set to <code>false</code>.
@property (nonatomic, readonly) BOOL forceCropMode;
/// The compression quality to use when creating the output image. Default is <code>0.9</code>.
@property (nonatomic, readonly) CGFloat compressionQuality;
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum PhotoEditOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable photoEditOverlayActionSelectedClosure)(enum PhotoEditOverlayAction);
/// The undo/redo buttons in the <code>PhotoEditViewController</code> have two different modes of operation:
/// If this property is <code>true</code> (the default) each operation will be undone individually. So for
/// example if you draw 3 strokes in the brush tool and move a sticker around twice in the
/// sticker options tools, you’d have to tap ‘undo’ 5 times to undo everything.
/// If this property is <code>false</code> all modifications that have been made within a single tool will
/// be grouped together and undone in one step. In the above example that means that you’d only
/// have to tap ‘undo’ 2 times to undo everything (once for the changes within the sticker
/// options tool and once for the changes within the brush tool).
@property (nonatomic, readonly) BOOL undoStepByStep;
/// If set this closure is called when the user taps the discard button while changes to the
/// image are applied. You can for example use this to present an alert view informing the user
/// that he is about to lose his changes. You have to call the passed closure when you have
/// confirmation by the user to continue with program execution. By default it is set to present
/// an <code>UIAlertController</code>.
@property (nonatomic, readonly, copy) void (^ _Nullable discardConfirmationClosure)(PESDKPhotoEditViewController * _Nonnull, void (^ _Nonnull)(void));
/// Returns a newly allocated instance of a <code>PhotoEditViewControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>PhotoEditViewControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>PhotoEditViewControllerOptions</code> using the given builder.
/// \param builder A <code>PhotoEditViewControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>PhotoEditViewControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKPhotoEditViewControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
@end


/// The default <code>PhotoEditViewControllerOptionsBuilder</code> for <code>PhotoEditViewControllerOptions</code>.
SWIFT_CLASS_NAMED("PhotoEditViewControllerOptionsBuilder")
@interface PESDKPhotoEditViewControllerOptionsBuilder : NSObject
/// A configuration closure to configure the toolbars title view.
@property (nonatomic, copy) void (^ _Nullable titleViewConfigurationClosure)(UIView * _Nonnull);
/// The main view’s background color. Defaults to the configuration’s global background color.
@property (nonatomic, strong) UIColor * _Nullable backgroundColor;
/// The background color of the accessory view. Defaults to the configuration’s global background color.
@property (nonatomic, strong) UIColor * _Nullable accessoryViewBackgroundColor;
/// A configuration closure to configure the apply button displayed at the bottom right.
/// Defaults to a checkmark icon.
@property (nonatomic, copy) void (^ _Nullable applyButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// A configuration closure to configure the discard button displayed at the bottom left.
/// Defaults to a cross icon.
@property (nonatomic, copy) void (^ _Nullable discardButtonConfigurationClosure)(PESDKButton * _Nonnull);
/// Sets the frame scaling behaviour.
@property (nonatomic) UIViewContentMode frameScaleMode;
/// When set to <code>true</code>, the user is forced to crop the photo to one of the allowed crop aspects
/// in <code>TransformToolControllerOptions.allowedCropAspects</code> before being able to use other
/// features of the editor. The transform tool will only be presented if the image does not
/// already fit one of those allowed aspect ratios. It will be presented automatically, if the
/// user changes the orientation of the photo and the resulting image does not match an allowed
/// aspect ratio. Defaults to <code>false</code>.
/// attention:
/// This property has no effect unless <code>TransformToolControllerOptions.allowFreeCrop</code>
/// is set to <code>false</code>.
@property (nonatomic) BOOL forceCropMode;
/// Controls if the user can zoom the preview image. Defaults to <code>true</code>.
@property (nonatomic) BOOL allowsPreviewImageZoom;
/// The compression quality to use when creating the output image. Default is <code>0.9</code>.
@property (nonatomic) CGFloat compressionQuality;
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum PhotoEditOverlayAction);
/// This closure is called when the user selects an overlay action.
@property (nonatomic, copy) void (^ _Nullable photoEditOverlayActionSelectedClosure)(enum PhotoEditOverlayAction);
/// The undo/redo buttons in the <code>PhotoEditViewController</code> have two different modes of operation:
/// If this property is <code>true</code> (the default) each operation will be undone individually. So for
/// example if you draw 3 strokes in the brush tool and move a sticker around twice in the
/// sticker options tools, you’d have to tap ‘undo’ 5 times to undo everything.
/// If this property is <code>false</code> all modifications that have been made within a single tool will
/// be grouped together and undone in one step. In the above example that means that you’d only
/// have to tap ‘undo’ 2 times to undo everything (once for the changes within the sticker
/// options tool and once for the changes within the brush tool).
@property (nonatomic) BOOL undoStepByStep;
/// If set this closure is called when the user taps the discard button while changes to the
/// image are applied. You can for example use this to present an alert view informing the user
/// that he is about to lose his changes. You have to call the passed closure when you have
/// confirmation by the user to continue with program execution. By default it is set to present
/// an <code>UIAlertController</code>.
@property (nonatomic, copy) void (^ _Nullable discardConfirmationClosure)(PESDKPhotoEditViewController * _Nonnull, void (^ _Nonnull)(void));
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKPhotoEditViewControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, copy) void (^ _Nullable actionButtonConfigurationBlock)(PESDKIconCaptionCollectionViewCell * _Nonnull, PESDKMenuItem * _Nonnull);
/// This closure is called every time the user selects a menu item.
@property (nonatomic, copy) void (^ _Nullable photoEditorActionSelectedBlock)(PESDKMenuItem * _Nonnull);
/// An array of <code>PhotoEditOverlayAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedPhotoEditOverlayActions</code> with the corresponding <code>PhotoEditOverlayAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedPhotoEditOverlayActionsAsNSNumbers;
@end


/// The <code>PhotoEffect</code> class describes an effect that can be applied to a photo.
SWIFT_CLASS_NAMED("PhotoEffect")
@interface PESDKPhotoEffect : NSObject
/// The identifier of the effect.
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier;
/// The name of the <code>CIFilter</code> that should be used to apply this effect.
@property (nonatomic, readonly, copy) NSString * _Nullable ciFilterName;
/// The URL of the lut image that should be used to generate a color cube.
@property (nonatomic, readonly, copy) NSURL * _Nullable lutURL;
/// The name that is displayed to the user.
@property (nonatomic, readonly, copy) NSString * _Nonnull displayName;
/// Additional options that should be passed to the <code>CIFilter</code> object that will be created when applying this effect.
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nullable options;
/// Creates a new photo effect.
/// \param identifier An identifier that uniquely identifies the effect.
///
/// \param filterName The name of the <code>CIFilter</code> that should be used to apply this effect.
///
/// \param displayName The name that is displayed to the user.
///
/// \param options Additional options that should be passed to the <code>CIFilter</code> object that will be created when applying this effect.
///
///
/// returns:
/// A newly initialized <code>PhotoEffect</code> object.
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier ciFilterName:(NSString * _Nullable)filterName displayName:(NSString * _Nonnull)displayName options:(NSDictionary<NSString *, id> * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
/// Creates a photo effect that uses the LUT at url <code>lutURL</code> to generate the color cube data for
/// the filter.
/// \param identifier An identifier that uniquely identifies the effect.
///
/// \param lutURL The URL of the lut image that should be used to generate a color cube.
///
/// \param displayName The name that is displayed to the user.
///
///
/// returns:
/// A newly initialized <code>PhotoEffect</code> object.
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier lutURL:(NSURL * _Nullable)lutURL displayName:(NSString * _Nonnull)displayName OBJC_DESIGNATED_INITIALIZER;
/// Returns a new <code>CIFilter</code> object with the given name and options.
@property (nonatomic, readonly, strong) CIFilter * _Nullable newEffectFilter;
/// Change this array to only support a subset of all available filters or to include custom
/// filters. By default this array includes all available filters.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSArray<PESDKPhotoEffect *> * _Nonnull allEffects;)
+ (NSArray<PESDKPhotoEffect *> * _Nonnull)allEffects SWIFT_WARN_UNUSED_RESULT;
+ (void)setAllEffects:(NSArray<PESDKPhotoEffect *> * _Nonnull)value;
/// This method returns the photo effect with the given identifier if such an effect exists.
/// \param identifier The identifier of the photo effect.
///
///
/// returns:
/// A <code>PhotoEffect</code> object.
+ (PESDKPhotoEffect * _Nullable)effectWithIdentifier:(NSString * _Nonnull)identifier SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// A <code>PhotoEffectThumbnailRenderer</code> can be used to generate thumbnails of a given input image for
/// multiple photo effects.
SWIFT_CLASS_NAMED("PhotoEffectThumbnailRenderer")
@interface PESDKPhotoEffectThumbnailRenderer : NSObject
/// The input image that will be used to generate the thumbnails.
@property (nonatomic, readonly, strong) UIImage * _Nonnull inputImage;
/// Creates a photo effect thumbnail renderer with the given input image.
/// \param inputImage The input image that will be used to generate the thumbnails.
///
///
/// returns:
/// A newly initialized <code>PhotoEffectThumbnailRenderer</code> object.
- (nonnull instancetype)initWithInputImage:(UIImage * _Nonnull)inputImage OBJC_DESIGNATED_INITIALIZER;
/// Generates thumbnails for multiple photo effects of the given size.
/// \param photoEffects The photo effects that should be used to generate thumbnails.
///
/// \param size The size of the thumbnails.
///
/// \param singleCompletion This handler will be called for each thumbnail that has been created successfully.
///
- (void)generateThumbnailsForPhotoEffects:(NSArray<PESDKPhotoEffect *> * _Nonnull)photoEffects ofSize:(CGSize)size singleCompletion:(void (^ _Nonnull)(UIImage * _Nonnull, NSInteger))singleCompletion;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end




/// Applies a radial focus to an instance of <code>CIImage</code>.
SWIFT_CLASS_NAMED("RadialFocusFilter")
@interface PESDKRadialFocusFilter : CIFilter
/// The input image.
@property (nonatomic, strong) CIImage * _Nullable inputImage;
/// The first normalized control point of the focus. This control point should use the coordinate system of Core Image, which means that (0,0) is at the top left.
@property (nonatomic, strong) NSValue * _Nullable inputNormalizedControlPoint1;
/// The second normalized control point of the focus. This control point should use the coordinate system of Core Image, which means that (0,0) is at the top left.
@property (nonatomic, strong) NSValue * _Nullable inputNormalizedControlPoint2;
/// The blur radius to use for focus. Default is 10.
@property (nonatomic, strong) NSNumber * _Nullable inputRadius;
/// The fade width to use for focus. Default is 0.
@property (nonatomic, strong) NSNumber * _Nullable inputNormalizedFadeWidth;
/// The quality that should be used. Low should be used only during preview.
@property (nonatomic) enum BlurQuality inputBlurQuality;
/// :nodoc:
- (void)setDefaults;
/// :nodoc:
@property (nonatomic, readonly, strong) CIImage * _Nullable outputImage;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

/// The <code>RecordingMode</code> determins if a photo or a video should be recorded.
typedef SWIFT_ENUM(NSInteger, RecordingMode) {
/// Record a Photo.
  RecordingModePhoto = 0,
/// Record a Video.
  RecordingModeVideo = 1,
};


/// A <code>StampGenerator</code> is responsible for generating a stamp image that is used by a brush to draw a stroke.
SWIFT_CLASS_NAMED("StampGenerator")
@interface PESDKStampGenerator : NSObject
/// The size of the generated stamp.
@property (nonatomic) CGSize size;
/// The stamp image.
@property (nonatomic, readonly, strong) UIImage * _Nonnull stamp;
/// A lower resolution version of the stamp image. This is used for the brush preview.
@property (nonatomic, readonly, strong) UIImage * _Nonnull smallStamp;
/// The base dimension of the generated stamp image.
@property (nonatomic, readonly) CGFloat baseDimension;
/// The bounds of the generated stamp image.
@property (nonatomic, readonly) CGRect baseBounds;
/// The scale of the stamp image in respect to its base dimension.
@property (nonatomic, readonly) CGFloat scale;
/// The object that acts as the delegate of the stamp generator.
@property (nonatomic, weak) id <PESDKGeneratorDelegate> _Nullable delegate;
/// This method should by overriden by subclasses. This is where the actual stamp image should be generated using Core Graphics.
/// \param context The context to render into.
///
- (void)renderStampInContext:(CGContextRef _Nonnull)context;
/// A helper method to generate a radial gradient image from white to black.
/// \param hardness The hardness of the gradient.
///
///
/// returns:
/// A radial gradient image from white to black.
- (CGImageRef _Nonnull)radialFadeWithHardness:(CGFloat)hardness SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>RoundGenerator</code> generates a round stamp image with a given hardness.
SWIFT_CLASS_NAMED("RoundGenerator")
@interface PESDKRoundGenerator : PESDKStampGenerator
/// The hardness of the stamp image that is being generated.
@property (nonatomic) CGFloat hardness;
/// :nodoc:
- (void)renderStampInContext:(CGContextRef _Nonnull)context;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

@protocol PESDKScalePickerDelegate;

/// A <code>ScalePicker</code> provides an UI element to pick values.
SWIFT_CLASS_NAMED("ScalePicker")
@interface PESDKScalePicker : UIView
/// The current value of the scale picker.
@property (nonatomic) CGFloat currentValue;
/// The smallest pickable value.
@property (nonatomic) NSInteger minValue;
/// The biggest pickable value.
@property (nonatomic) NSInteger maxValue;
/// The dimensions of a tick.
@property (nonatomic) CGSize tickSize;
/// The dimensions of the main tick. That is the tick the marks the zero-value.
@property (nonatomic) CGSize mainTickSize;
/// The spacing between ticks.
@property (nonatomic) CGFloat spaceBetweenTicks;
/// The color of ticks.
@property (nonatomic, strong) UIColor * _Nonnull tickColor;
/// The color of the value label.
@property (nonatomic, strong) UIColor * _Nonnull textColor;
/// The color of a view that lies behind the value label. That should be the background with an alpha value.
/// This view is used to improve the readability of the value label.
@property (nonatomic, strong) UIColor * _Nonnull valueLabelBackgroundColor;
/// A delegate that informs the receiver about changes of the value.
@property (nonatomic, weak) id <PESDKScalePickerDelegate> _Nullable delegate;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// This method will move the scale to the given value.
- (void)scrollToValue:(CGFloat)value;
/// :nodoc:
- (void)accessibilityIncrement;
/// :nodoc:
- (void)accessibilityDecrement;
@end


@interface PESDKScalePicker (SWIFT_EXTENSION(PhotoEditorSDK)) <UIScrollViewDelegate>
/// :nodoc:
- (void)scrollViewDidScroll:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewWillEndDragging:(UIScrollView * _Nonnull)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(CGPoint * _Nonnull)targetContentOffset;
@end


/// The <code>ScalePickerDelegate</code> protocol defines a set of methods you can use to receive value-change
/// messages for <code>ScalePicker</code> objects.
SWIFT_PROTOCOL_NAMED("ScalePickerDelegate")
@protocol PESDKScalePickerDelegate
/// Called when the scale picker’s value changes.
/// \param value The new value of the scale picker.
///
/// \param scalePicker The scale picker that called this method.
///
- (void)scalePicker:(CGFloat)value didChangeValue:(PESDKScalePicker * _Nonnull)scalePicker;
@end


/// A <code>SeparatorCollectionViewCell</code> is a cell that shows a single 1 pt wide vertical line. It is
/// usually used to represent a seperator between other cells.
SWIFT_CLASS_NAMED("SeparatorCollectionViewCell")
@interface PESDKSeparatorCollectionViewCell : UICollectionViewCell
/// A vertical line 1 pt wide line in the center of the cell.
@property (nonatomic, readonly, strong) UIView * _Nonnull separator;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// A Slider object is a visual control used to select a single value from a continuous range of
/// values. Sliders are always displayed as horizontal bars. An indicator, or thumb, notes the
/// current value of the slider and can be moved by the user to change the setting.
/// A vertical indicator, or neutral point, notes the default, unchanged value of the slider.
SWIFT_CLASS_NAMED("Slider")
@interface PESDKSlider : UIControl
/// The color used to tint the thumb image. If no color is set, the default <code>tintColor</code> will be used.
@property (nonatomic, strong) UIColor * _Nullable thumbTintColor;
/// The color used to tint the background color of the thumb.
@property (nonatomic, strong) UIColor * _Nonnull thumbBackgroundColor;
/// The color used to tint the filled track. If no color is set, the default <code>tintColor</code> will be used.
@property (nonatomic, strong) UIColor * _Nullable filledTrackColor;
/// The color used to tint the unfilled track.
@property (nonatomic, strong) UIColor * _Nonnull unfilledTrackColor;
/// Contains the minimum value of the receiver.
@property (nonatomic) CGFloat minimumValue;
/// Contains the maximum value of the receiver.
@property (nonatomic) CGFloat maximumValue;
/// Contains the neutral value of the receiver.
@property (nonatomic) CGFloat neutralValue;
/// Contains the receiver’s current value.
@property (nonatomic) CGFloat value;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)accessibilityIncrement;
/// :nodoc:
- (void)accessibilityDecrement;
/// :nodoc:
- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder;
/// :nodoc:
- (void)layoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) CGSize intrinsicContentSize;
/// :nodoc:
- (void)tintColorDidChange;
/// Returns the drawing rectangle for the slider’s thumb image.
/// \param bounds The bounding rectangle of the receiver.
///
/// \param value The current value of the slider.
///
///
/// returns:
/// The computed drawing rectangle for the thumb image.
- (CGRect)thumbRectFor:(CGRect)bounds value:(CGFloat)value SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// :nodoc:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (BOOL)continueTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
@end

@class NSAttributedString;

/// A SliderTooltip object is a visual element that displays a Slider’s current value above the
/// thumb image while dragging.
SWIFT_CLASS("_TtC14PhotoEditorSDK13SliderTooltip")
@interface SliderTooltip : UIView
/// The background color of the tooltip.
@property (nonatomic, strong) UIColor * _Nonnull tooltipColor;
/// The string to display in the tooltip.
@property (nonatomic, strong) NSAttributedString * _Nullable attributedString;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)drawRect:(CGRect)rect;
/// :nodoc:
@property (nonatomic, readonly) CGSize intrinsicContentSize;
@end

@class PESDKStickerImageView;
@class PESDKSticker;
@class PESDKTextLabel;
@class UIFont;

/// An <code>SpriteController</code> manages all sprites that have been added to an image and hosts the
/// sprite’s container view.
SWIFT_CLASS_NAMED("SpriteController")
@interface PESDKSpriteController : NSObject
/// The parent view that the container was added to.
@property (nonatomic, readonly, strong) UIView * _Nonnull parentView;
/// The container view that hosts all sprites.
@property (nonatomic, readonly, strong) UIView * _Nonnull view;
/// The base image. Needed for some calculations.
@property (nonatomic, strong) CIImage * _Nullable baseImage;
/// An <code>UIImage</code> of the painting to use as an sprite.
@property (nonatomic, strong) UIImage * _Nullable painting;
/// The image view that displays the painting.
@property (nonatomic, readonly, strong) PESDKBrushImageView * _Nonnull paintingImageView;
/// The image view that displays the frame.
@property (nonatomic, readonly, strong) PESDKFrameImageView * _Nonnull frameImageView;
/// The undo controller associated with this sprite controller.
@property (nonatomic, readonly, strong) PESDKUndoController * _Nonnull undoController;
/// The currently selected sprite.
@property (nonatomic, strong) UIView * _Nullable selectedSpriteView;
/// A handler that should be called when the currently selected sprite changes.
@property (nonatomic, copy) void (^ _Nullable selectionChangedHandler)(UIView * _Nullable, UIView * _Nullable);
/// An array of sprites that have been added to the sprite controller. This excludes the painting and frame.
@property (nonatomic, readonly, copy) NSArray<UIView *> * _Nonnull sprites;
/// Whether or not any sprites are added.
@property (nonatomic, readonly) BOOL spritesAdded;
/// Adds a sticker image view as a sprite.
/// \param imageView The sticker image view to add.
///
- (void)addStickerImageView:(PESDKStickerImageView * _Nonnull)imageView;
/// Adds a sticker as an sprite.
/// \param sticker The sticker that should be added.
///
/// \param image The image of the sticker.
///
/// \param select Whether or not the sticker should be selected after it was added.
///
/// \param completion A completion handler to run after the sticker was added.
///
///
/// returns:
/// The image view that was added.
- (UIImageView * _Nonnull)addSticker:(PESDKSticker * _Nonnull)sticker withImage:(UIImage * _Nonnull)image select:(BOOL)select completion:(void (^ _Nullable)(UIImageView * _Nonnull))completion;
/// Adds text as an sprite.
/// \param text The text to add as an sprite.
///
/// \param color The color of the text.
///
/// \param select Whether or not the text should be selected after it was added.
///
/// \param completion A completion handler to run after the sticker was added.
///
///
/// returns:
/// The text label that was added.
- (PESDKTextLabel * _Nonnull)addText:(NSString * _Nonnull)text color:(UIColor * _Nonnull)color select:(BOOL)select completion:(void (^ _Nullable)(PESDKTextLabel * _Nonnull))completion;
/// Add a text label to the sprite controller.
/// \param label A label.
///
- (void)addTextLabel:(PESDKTextLabel * _Nonnull)label;
/// Adds a frame as an sprite.
/// \param frame The frame to add to the image.
///
/// \param image The image to add to the image.
///
- (void)addFrame:(PESDKFrame * _Nonnull)frame withImage:(UIImage * _Nonnull)image;
/// Removes the current frame as an sprite.
- (void)removeFrame;
/// Moves the currently selected sprite to the front.
- (void)bringSelectedSpriteToFront;
/// Moves the passed sprite to the front.
/// \param sprite The sprite to move to the front.
///
- (void)bringSpriteToFront:(UIView * _Nonnull)sprite;
/// Moves the passed sprite to the specified index.
/// \param sprite The sprite to move.
///
/// \param index The index to move to.
///
- (void)moveSprite:(UIView * _Nonnull)sprite toIndex:(NSInteger)index;
/// Moves the painting to the front.
- (void)bringPaintingToFront;
/// Moves the frame to the front.
- (void)bringFrameToFront;
/// Moves the frame to the back.
- (void)sendFrameToBack;
/// Whether or not the frame is in front of the sprites.
@property (nonatomic, readonly) BOOL isFrameInFront;
/// Resets the rotation of the currently selected sprite.
- (void)straightenSelectedSprite;
/// Resets the rotation of the passed sprite.
/// \param sprite The sprite to reset.
///
- (void)straightenSprite:(UIView * _Nonnull)sprite;
/// Rotates the passed sprite be the specified radians.
/// \param sprite The sprite to rotate.
///
/// \param radians The amount of radians to rotate by.
///
- (void)rotateSprite:(UIView * _Nonnull)sprite byRadians:(CGFloat)radians;
/// Transforms the passed sprite from the specified transform to the other specified transform.
/// \param sprite The sprite to transform.
///
/// \param startTransform The start transform (this is only used for undo).
///
/// \param endTransform The transform to apply to the sprite.
///
- (void)transformSprite:(UIView * _Nonnull)sprite from:(CGAffineTransform)startTransform to:(CGAffineTransform)endTransform;
/// Resizes the passed sprite from the specified rect to the other specified rect.
/// \param sprite The sprite to resize.
///
/// \param startBounds The start rect (this is only used for undo).
///
/// \param endBounds The rect to resize the sprite to.
///
- (void)resizeSprite:(UIView * _Nonnull)sprite from:(CGRect)startBounds to:(CGRect)endBounds;
/// Moves the passed sprite from the specified point to the other specified point.
/// \param sprite The sprite to move.
///
/// \param startPoint The start point (this is only used for undo).
///
/// \param endPoint The point to move the sprite to.
///
- (void)moveSprite:(UIView * _Nonnull)sprite from:(CGPoint)startPoint to:(CGPoint)endPoint;
/// Moves and resizes the sprite.
/// \param sprite The sprite to move and resize.
///
/// \param startPoint The start point (this is only used for undo).
///
/// \param endPoint The point to move the sprite to.
///
/// \param startBounds The start rect (this is only used for undo).
///
/// \param toBounds The rect to resize the sprite to.
///
- (void)moveSprite:(UIView * _Nonnull)sprite from:(CGPoint)startPoint to:(CGPoint)endPoint resizingFrom:(CGRect)startBounds toRect:(CGRect)toBounds;
/// Flips the currently selected sprite horizontally.
- (void)flipSelectedSprite;
/// Flips the passed sprite horizontally. Currently only supports stickers.
/// \param sprite The sprite to flip.
///
- (void)flipSprite:(UIView * _Nonnull)sprite;
/// Changes the tint or background color (where appropriate) of an sprite.
/// \param sprite The sprite to change the color for.
///
/// \param fromColor The start color (this is only used for undo).
///
/// \param toColor The color to change to.
///
/// \param changeBackground When <code>true</code> the background color is changed (where possible).
///
- (void)changeSprite:(UIView * _Nonnull)sprite from:(UIColor * _Nonnull)fromColor to:(UIColor * _Nonnull)toColor changeBackground:(BOOL)changeBackground;
/// Changes the font of a text label.
/// \param label The label to change the font of.
///
/// \param fromFont The start font (this is only used for undo).
///
/// \param toFont The font to change to.
///
- (void)changeTextLabel:(PESDKTextLabel * _Nonnull)label from:(UIFont * _Nonnull)fromFont to:(UIFont * _Nonnull)toFont;
/// Changes the text of a label.
/// \param label The label to change the text of.
///
/// \param fromText The text to change from (this is only used for undo).
///
/// \param toText The text to change to.
///
- (void)changeTextLabel:(PESDKTextLabel * _Nonnull)label fromText:(NSString * _Nullable)fromText toText:(NSString * _Nullable)toText;
/// Changes the text alignment of a label.
/// \param label The label to change the alignment of.
///
/// \param fromAlignment The alignment to change from (this is only used for undo).
///
/// \param toAlignment The alignment to change to.
///
- (void)changeTextLabel:(PESDKTextLabel * _Nonnull)label fromAlignment:(NSTextAlignment)fromAlignment toAlignment:(NSTextAlignment)toAlignment;
/// Removes the currently selected sprite.
- (void)removeSelectedSprite;
/// Removes the currently selected sprite.
- (void)removeWithSprite:(UIView * _Nonnull)sprite;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end



@interface PESDKStackLayoutToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIScrollViewDelegate>
/// :nodoc:
- (void)scrollViewDidScroll:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewDidZoom:(UIScrollView * _Nonnull)scrollView;
/// :nodoc:
- (void)scrollViewDidEndZooming:(UIScrollView * _Nonnull)scrollView withView:(UIView * _Nullable)view atScale:(CGFloat)scale;
/// :nodoc:
- (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT;
@end


enum PESDKStickerTintMode : NSInteger;

/// A <code>Sticker</code> represents a single sticker in a sticker category. Each sticker needs an image and a
/// thumbnail image. If no thumbnail is provided, it is automatically generated.
SWIFT_CLASS_NAMED("Sticker")
@interface PESDKSticker : NSObject
/// The URL for the sticker’s full size image. This can be a file url or a remote url.
@property (nonatomic, readonly, copy) NSURL * _Nonnull imageURL;
/// The thumbnail URL of the sticker. If this is <code>nil</code>, it will be generated
/// automatically from the full size image. This can be a file url or a remote url.
@property (nonatomic, readonly, copy) NSURL * _Nullable thumbnailURL;
/// The tint mode that this sticker supports. Default is <code>.none</code>.
@property (nonatomic, readonly) enum PESDKStickerTintMode tintMode;
/// This string is used to identify the sticker. I must be unique.
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier;
/// Creates a sticker with an image url and optionally a thumbnail url.
/// \param imageURL The url for the sticker’s full size image.
///
/// \param thumbnailURL The url for the sticker’s thumbnail image.
///
- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL thumbnailURL:(NSURL * _Nullable)thumbnailURL identifier:(NSString * _Nonnull)identifier;
/// Creates a sticker with an image url and optionally a thumbnail url.
/// \param imageURL The url for the sticker’s full size image.
///
/// \param thumbnailURL The url for the sticker’s thumbnail image.
///
/// \param tintMode The tint mode that this sticker supports.
///
- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL thumbnailURL:(NSURL * _Nullable)thumbnailURL tintMode:(enum PESDKStickerTintMode)tintMode identifier:(NSString * _Nonnull)identifier OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end

/// The actions that can be used in an instance of <code>StickerOptionsToolController</code>.
/// <ul>
///   <li>
///     selectColor:     Change the color of the sticker.
///   </li>
///   <li>
///     flip:            Flip the sticker.
///   </li>
///   <li>
///     straighten:      Straighten the sticker.
///   </li>
///   <li>
///     bringToFront:    Bring the sticker to the front.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, StickerAction) {
/// Change the color of the sticker.
  StickerActionSelectColor = 0,
/// Flip the sticker.
  StickerActionFlip = 1,
/// Straighten the sticker.
  StickerActionStraighten = 2,
/// Bring the sticker to the front.
  StickerActionBringToFront = 3,
};


/// A <code>StickerCategory</code> represents one category of stickers. Each category has a preview image and
/// multiple stickers associated with it. To support accessibility you should also set its
/// <code>accessibilityLabel</code>.
SWIFT_CLASS_NAMED("StickerCategory")
@interface PESDKStickerCategory : NSObject
/// The title of this category, e.g. ‘Toy Collection’.
@property (nonatomic, readonly, copy) NSString * _Nonnull title;
/// The URL of the category’s preview image. This can be a file url or a remote url.
@property (nonatomic, readonly, copy) NSURL * _Nonnull imageURL;
/// The stickers associated with this category.
@property (nonatomic, readonly, copy) NSArray<PESDKSticker *> * _Nonnull stickers;
/// Creates a sticker category with an image url. The associated image is automatically loaded
/// when needed.
/// \param title The title of this category, e.g. ‘Toy Collection’.
///
/// \param imageURL The url for the category’s preview image.
///
/// \param stickers The stickers to associate with this category.
///
- (nonnull instancetype)initWithTitle:(NSString * _Nonnull)title imageURL:(NSURL * _Nonnull)imageURL stickers:(NSArray<PESDKSticker *> * _Nonnull)stickers OBJC_DESIGNATED_INITIALIZER;
/// The pool of categories available within the SDK.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) NSArray<PESDKStickerCategory *> * _Nonnull all;)
+ (NSArray<PESDKStickerCategory *> * _Nonnull)all SWIFT_WARN_UNUSED_RESULT;
+ (void)setAll:(NSArray<PESDKStickerCategory *> * _Nonnull)value;
/// Creates the default sticker categories that are shipped with the SDK.
///
/// returns:
/// An array of sticker categories.
+ (NSArray<PESDKStickerCategory *> * _Nonnull)createDefaultStickerCategories SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


/// A sticker category data source provides the sticker categories that should be displayed in the
/// sticker tool.
SWIFT_CLASS_NAMED("StickerCategoryDataSource")
@interface PESDKStickerCategoryDataSource : NSObject
/// The collection view of this data source.
@property (nonatomic, readonly, strong) UICollectionView * _Nonnull collectionView;
/// The sticker categories to display.
@property (nonatomic, copy) NSArray<PESDKStickerCategory *> * _Nullable stickerCategories;
/// A closure that is called when the sticker categories changed.
@property (nonatomic, copy) void (^ _Nullable stickerCategoriesChangedClosure)(void);
/// A closure that is called to modify the cell for a given sticker category.
@property (nonatomic, copy) void (^ _Nullable stickerCategoryCellConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKStickerCategory * _Nonnull);
/// The activity indicator that is displayed instead of the collection view while <code>stickerCategories</code>
/// is <code>nil</code> or does not have any items.
@property (nonatomic, readonly, strong) UIActivityIndicatorView * _Nonnull activityIndicator;
/// Creates a new sticker category data source for the given collection view.
/// \param collectionView The collection view of this data source.
///
- (nonnull instancetype)initWithCollectionView:(UICollectionView * _Nonnull)collectionView OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


@interface PESDKStickerCategoryDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSourcePrefetching>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView prefetchItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView cancelPrefetchingForItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
@end


@interface PESDKStickerCategoryDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>StickerCollectionViewCell</code> is a cell that has an image view and an activity indicator in its
/// center.
SWIFT_CLASS_NAMED("StickerCollectionViewCell")
@interface PESDKIconCollectionViewCell : UICollectionViewCell
/// An image view that usually shows an icon.
@property (nonatomic, readonly, strong) UIImageView * _Nonnull imageView;
/// An activity indicator in the center of the cell.
@property (nonatomic, readonly, strong) UIActivityIndicatorView * _Nonnull activityIndicator;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)prepareForReuse;
/// :nodoc:
@property (nonatomic, getter=isSelected) BOOL selected;
/// :nodoc:
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
@end


/// A <code>StickerColorToolController</code> is responsible for displaying the UI to adjust the color of a
/// sticker that has been added to an image.
SWIFT_CLASS_NAMED("StickerColorToolController")
@interface PESDKStickerColorToolController : PESDKColorToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKStickerColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKStickerColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)colorPicker:(PESDKColorPickerView * _Nonnull)colorPickerView didPickColor:(UIColor * _Nonnull)color;
@end


@interface PESDKStickerColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// A sticker data source provides the stickers that should be displayed in the sticker tool.
SWIFT_CLASS_NAMED("StickerDataSource")
@interface PESDKStickerDataSource : NSObject
/// The collection view of this data source.
@property (nonatomic, readonly, strong) UICollectionView * _Nonnull collectionView;
/// The stickers to display.
@property (nonatomic, copy) NSArray<PESDKSticker *> * _Nullable stickers;
/// A closure that is called to modify the cell for a given sticker.
@property (nonatomic, copy) void (^ _Nullable stickerCellConfigurationClosure)(PESDKIconCollectionViewCell * _Nonnull, PESDKSticker * _Nonnull);
/// Creates a new sticker data source for the given collection view.
/// \param collectionView The collection view of this data source.
///
- (nonnull instancetype)initWithCollectionView:(UICollectionView * _Nonnull)collectionView OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


@interface PESDKStickerDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSourcePrefetching>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView prefetchItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView cancelPrefetchingForItemsAtIndexPaths:(NSArray<NSIndexPath *> * _Nonnull)indexPaths;
@end


@interface PESDKStickerDataSource (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>StickerImageView</code> displays an instance of <code>Sticker</code> and provides improved support for accessibility.
SWIFT_CLASS_NAMED("StickerImageView")
@interface PESDKStickerImageView : UIImageView
/// The sticker that this image view should display.
@property (nonatomic, readonly, strong) PESDKSticker * _Nonnull sticker;
/// Called by accessibility to make the image view smaller.
@property (nonatomic, copy) void (^ _Nullable decrementHandler)(void);
/// Called by accessibility to make the image view bigger.
@property (nonatomic, copy) void (^ _Nullable incrementHandler)(void);
/// Called by accessibility to rotate the image view to the left.
@property (nonatomic, copy) void (^ _Nullable rotateLeftHandler)(void);
/// Called by accessibility to rotate the image view to the right.
@property (nonatomic, copy) void (^ _Nullable rotateRightHandler)(void);
/// This property holds the normalized center of the view within the image without any crops added.
/// It is used to calculate the correct position of the sticker within the preview view.
@property (nonatomic) CGPoint normalizedCenter;
/// This property holds the normalized size.
@property (nonatomic) CGPoint normalizedSize;
/// This color is used to tint the sticker according to the tint mode.
@property (nonatomic, strong) UIColor * _Null_unspecified tintColor;
/// Whether this sticker is currently selected.
@property (nonatomic) BOOL isSelected;
/// Returns a newly allocated instance of <code>StickerImageView</code> with the given sticker.
/// \param sticker The sticker that should be shown in this image view.
///
///
/// returns:
/// An instance of <code>StickerImageView</code>.
- (nonnull instancetype)initWithSticker:(PESDKSticker * _Nonnull)sticker OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)accessibilityDecrement;
/// :nodoc:
- (void)accessibilityIncrement;
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithImage:(UIImage * _Nullable)image highlightedImage:(UIImage * _Nullable)highlightedImage SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
@end


/// An <code>StickerOptionsToolController</code> is reponsible for displaying the UI to edit a sticker.
SWIFT_CLASS_NAMED("StickerOptionsToolController")
@interface PESDKStickerOptionsToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKStickerOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKStickerOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKStickerOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKStickerOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKStickerOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end

enum StickerOverlayAction : NSInteger;

/// Options for configuring a <code>StickerOptionsToolController</code>.
SWIFT_CLASS_NAMED("StickerOptionsToolControllerOptions")
@interface PESDKStickerOptionsToolControllerOptions : PESDKToolControllerOptions
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable stickerActionSelectedClosure)(enum StickerAction);
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable actionButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum StickerAction);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum StickerOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable stickerOverlayActionSelectedClosure)(enum StickerOverlayAction);
/// Creates an instance of <code>StickerOptionsToolControllerOptions</code> using the default builder.
- (nonnull instancetype)init;
/// Creates an instance of <code>StickerOptionsToolControllerOptions</code> using the given builder.
/// \param builder A builder to create the options.
///
- (nonnull instancetype)initWithBuilder:(PESDKStickerOptionsToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>StickerOptionsToolControllerOptionsBuilder</code> for <code>StickerOptionsToolControllerOptions</code>.
SWIFT_CLASS_NAMED("StickerOptionsToolControllerOptionsBuilder")
@interface PESDKStickerOptionsToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure is called when the user selects an action.
@property (nonatomic, copy) void (^ _Nullable stickerActionSelectedClosure)(enum StickerAction);
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, copy) void (^ _Nullable actionButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum StickerAction);
/// This closure allows further configuration of the overlay buttons. The closure is called for
/// each button and has the button and its corresponding enum value as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum StickerOverlayAction);
/// This closure is called when the user selects an action.
@property (nonatomic, copy) void (^ _Nullable stickerOverlayActionSelectedClosure)(enum StickerOverlayAction);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKStickerOptionsToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>StickerOverlayAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedStickerOverlayActions</code> with the corresponding <code>StickerOverlayAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedStickerOverlayActionsAsNSNumbers;
@end

/// The overlay actions that can be used in an instance of <code>StickerToolControllerOptions</code>.
/// <ul>
///   <li>
///     add:     Switch to the add sticker UI.
///   </li>
///   <li>
///     delete:  Delete the sticker.
///   </li>
///   <li>
///     undo:    Undo
///   </li>
///   <li>
///     redo:    Redo
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, StickerOverlayAction) {
/// Switch to the add sticker UI.
  StickerOverlayActionAdd = 0,
/// Delete the sticker.
  StickerOverlayActionDelete = 1,
/// Undo
  StickerOverlayActionUndo = 2,
/// Redo
  StickerOverlayActionRedo = 3,
};

/// The tinting mode a sticker supports.
/// <ul>
///   <li>
///     none:         The sticker’s color cannot be changed.
///   </li>
///   <li>
///     solid:        The sticker’s color is changed completely (i.e. <code>tintColor</code> is used).
///   </li>
///   <li>
///     colorized:    The sticker is converted to a gray scale image and the selected tint color is then
///     applied by the amount of the gray scale value.
///   </li>
/// </ul>
typedef SWIFT_ENUM_NAMED(NSInteger, PESDKStickerTintMode, "StickerTintMode") {
/// The sticker’s color cannot be changed.
  PESDKStickerTintModeNone = 0,
/// The sticker’s color is changed completely (i.e. <code>tintColor</code> is used).
  PESDKStickerTintModeSolid = 1,
/// The sticker is converted to a gray scale image and the selected tint color is then applied
/// by the amount of the gray scale value.
  PESDKStickerTintModeColorized = 2,
};


/// A <code>StickerToolController</code> is reponsible for displaying the UI to add stickers to an image.
SWIFT_CLASS_NAMED("StickerToolController")
@interface PESDKStickerToolController : PESDKStackLayoutToolController
/// The sticker category data source that is associated with this view controller.
@property (nonatomic, strong) PESDKStickerCategoryDataSource * _Nullable stickerCategoryDataSource;
/// The sticker data source that is associated with this view controller.
@property (nonatomic, strong) PESDKStickerDataSource * _Nullable stickerDataSource;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKStickerToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKProgressViewDisplayer>
/// :nodoc:
- (void)showProgressView;
/// :nodoc:
- (void)hideProgressView;
@end


@interface PESDKStickerToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKStickerToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


/// Options for configuring a <code>StickerToolController</code>.
SWIFT_CLASS_NAMED("StickerToolControllerOptions")
@interface PESDKStickerToolControllerOptions : PESDKToolControllerOptions
/// This closure is called when the user adds a sticker.
@property (nonatomic, readonly, copy) void (^ _Nullable addedStickerClosure)(PESDKSticker * _Nonnull);
/// This closure allows further configuration of the sticker category buttons. The closure is called for
/// each sticker category button and has the button and its corresponding sticker category as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable stickerCategoryButtonConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKStickerCategory * _Nonnull);
/// This closure allows further configuration of the sticker buttons. The closure is called for
/// each sticker button and has the button and its corresponding sticker as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable stickerButtonConfigurationClosure)(PESDKIconCollectionViewCell * _Nonnull, PESDKSticker * _Nonnull);
/// The size of the stickers in the preview. Default is <code>(44, 44)</code>.
@property (nonatomic, readonly) CGSize stickerPreviewSize;
/// Returns a newly allocated instance of a <code>StickersToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>MainToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>StickersToolControllerOptions</code> using the given builder.
/// \param builder A <code>StickersToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>StickersToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKStickerToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>StickerToolControllerOptionsBuilder</code> for <code>StickerToolControllerOptions</code>.
SWIFT_CLASS_NAMED("StickerToolControllerOptionsBuilder")
@interface PESDKStickerToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure is called when the user adds a sticker.
@property (nonatomic, copy) void (^ _Nullable addedStickerClosure)(PESDKSticker * _Nonnull);
/// This closure allows further configuration of the sticker category buttons. The closure is called for
/// each sticker category button and has the button and its corresponding sticker category as parameters.
@property (nonatomic, copy) void (^ _Nullable stickerCategoryButtonConfigurationClosure)(PESDKIconBorderedCollectionViewCell * _Nonnull, PESDKStickerCategory * _Nonnull);
/// This closure allows further configuration of the sticker buttons. The closure is called for
/// each sticker button and has the button and its corresponding sticker as parameters.
@property (nonatomic, copy) void (^ _Nullable stickerButtonConfigurationClosure)(PESDKIconCollectionViewCell * _Nonnull, PESDKSticker * _Nonnull);
/// The size of the stickers in the preview. Default is <code>(44, 44)</code>.
@property (nonatomic) CGSize stickerPreviewSize;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// The actions that can be used in an instance of <code>TextOptionsToolController</code>.
/// <ul>
///   <li>
///     selectFont:              Change the font of the text.
///   </li>
///   <li>
///     selectColor:             Change the color of the text.
///   </li>
///   <li>
///     selectBackgroundColor:   Change the color of the text’s bounding box.
///   </li>
///   <li>
///     selectAlignment:         Change the alignment of the text.
///   </li>
///   <li>
///     flip:                    Flip the label.
///   </li>
///   <li>
///     straighten:              Straighten the label.
///   </li>
///   <li>
///     bringToFront:            Bring the label to the front.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, TextAction) {
/// Change the font of the text.
  TextActionSelectFont = 0,
/// Change the color of the text.
  TextActionSelectColor = 1,
/// Change the color of the text’s bounding box.
  TextActionSelectBackgroundColor = 2,
/// Change the alignment of the text.
  TextActionSelectAlignment = 3,
/// Flip the label.
  TextActionFlip = 4,
/// Straighten the label
  TextActionStraighten = 5,
/// Bring the label to the front.
  TextActionBringToFront = 6,
};


/// A <code>TextButton</code> is used within a <code>FontSelectorView</code> to present different fonts and their names.
SWIFT_CLASS_NAMED("TextButton")
@interface PESDKTextButton : PESDKButton
/// The color of the label.
@property (nonatomic, strong) UIColor * _Nonnull labelColor;
/// The name of the font.
@property (nonatomic, copy) NSString * _Nonnull fontName;
/// :nodoc:
@property (nonatomic) CGRect frame;
/// The name that is shown to the user.
@property (nonatomic, copy) NSString * _Nonnull displayName;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

enum TextColorToolControllerMode : NSInteger;

/// A <code>TextColorToolController</code> is reponsible for displaying the UI to adjust the text color of text
/// that has been added to an image.
SWIFT_CLASS_NAMED("TextColorToolController")
@interface PESDKTextColorToolController : PESDKColorToolController
/// The <code>TextColorToolControllerMode</code> that this tool is handling.
@property (nonatomic) enum TextColorToolControllerMode mode;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKTextColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKTextColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTextColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
/// :nodoc:
- (void)colorPicker:(PESDKColorPickerView * _Nonnull)colorPickerView didPickColor:(UIColor * _Nonnull)color;
@end


@interface PESDKTextColorToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end

/// The different modes that an instance of <code>TextColorToolController</code> can handle.
/// <ul>
///   <li>
///     Foreground: The mode to handle the foreground appearance of the text.
///   </li>
///   <li>
///     Background: The mode to handle the background appearance of the text.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, TextColorToolControllerMode) {
/// The mode to handle the foreground appearance of the text.
  TextColorToolControllerModeForeground = 0,
/// The mode to handle the background appearance of the text.
  TextColorToolControllerModeBackground = 1,
};


/// Options for configuring a <code>TextColorToolController</code>.
SWIFT_CLASS_NAMED("TextColorToolControllerOptions")
@interface PESDKTextColorToolControllerOptions : PESDKColorToolControllerOptions
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// Returns a newly allocated instance of <code>TextColorToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of <code>TextColorToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of <code>TextColorToolControllerOptions</code> using the given builder.
/// \param textBuilder A <code>TextColorToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of <code>TextColorToolControllerOptions</code>.
- (nonnull instancetype)initWithTextBuilder:(PESDKTextColorToolControllerOptionsBuilder * _Nonnull)textBuilder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithBuilder:(PESDKColorToolControllerOptionsBuilder * _Nonnull)builder SWIFT_UNAVAILABLE;
@end


/// The default <code>TextColorToolControllerOptionsBuilder</code> for <code>TextColorToolControllerOptions</code>.
SWIFT_CLASS_NAMED("TextColorToolControllerOptionsBuilder")
@interface PESDKTextColorToolControllerOptionsBuilder : PESDKColorToolControllerOptionsBuilder
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>TextFontToolController</code> is responsible for displaying the UI to adjust the font of text that
/// has been added to an image.
SWIFT_CLASS_NAMED("TextFontToolController")
@interface PESDKTextFontToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKFontSelectorViewDelegate>
/// :nodoc:
- (void)fontSelectorView:(PESDKFontSelectorView * _Nonnull)fontSelectorView didSelectFontWithName:(NSString * _Nonnull)fontName;
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKTextFontToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


/// Options for configuring a <code>TextFontToolController</code>.
SWIFT_CLASS_NAMED("TextFontToolControllerOptions")
@interface PESDKTextFontToolControllerOptions : PESDKToolControllerOptions
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable actionButtonConfigurationClosure)(PESDKLabelCaptionCollectionViewCell * _Nonnull, NSString * _Nonnull);
/// This closure is called every time the user selects a crop ratio.
@property (nonatomic, readonly, copy) void (^ _Nullable textFontActionSelectedClosure)(NSString * _Nonnull);
/// This closure allows further configuration of the font selector view, i.e. the view that can
/// be expanded from the bottom to display a more detailed view of the fonts.
@property (nonatomic, readonly, copy) void (^ _Nullable fontSelectorViewConfigurationClosure)(PESDKFontSelectorView * _Nonnull);
/// This closure allows further configuration of the handle button, i.e. the view that is used to
/// expand the font selector view.
@property (nonatomic, readonly, copy) void (^ _Nullable handleButtonConfigurationClosure)(PESDKHandleButton * _Nonnull);
/// Returns a newly allocated instance of <code>TextFontToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of <code>TextFontToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of <code>TextColorToolControllerOptions</code> using the given builder.
/// \param builder A <code>TextColorToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of <code>TextColorToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKTextFontToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>TextFontToolControllerOptionsBuilder</code> for <code>TextFontToolControllerOptions</code>.
SWIFT_CLASS_NAMED("TextFontToolControllerOptionsBuilder")
@interface PESDKTextFontToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, copy) void (^ _Nullable actionButtonConfigurationClosure)(PESDKLabelCaptionCollectionViewCell * _Nonnull, NSString * _Nonnull);
/// This closure is called every time the user selects a crop ratio.
@property (nonatomic, copy) void (^ _Nullable textFontActionSelectedClosure)(NSString * _Nonnull);
/// This closure allows further configuration of the font selector view, i.e. the view that can
/// be expanded from the bottom to display a more detailed view of the fonts.
@property (nonatomic, copy) void (^ _Nullable fontSelectorViewConfigurationClosure)(PESDKFontSelectorView * _Nonnull);
/// This closure allows further configuration of the handle button, i.e. the view that is used to
/// expand the font selector view.
@property (nonatomic, copy) void (^ _Nullable handleButtonConfigurationClosure)(PESDKHandleButton * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>TextLabel</code> is used to show text that has been added to an image and provides improved support for accessibility.
SWIFT_CLASS_NAMED("TextLabel")
@interface PESDKTextLabel : UILabel
/// Called by accessibility to make this label smaller.
@property (nonatomic, copy) void (^ _Nullable decrementHandler)(void);
/// Called by accessibility to make this label bigger.
@property (nonatomic, copy) void (^ _Nullable incrementHandler)(void);
/// Called by accessibility to rotate this label to the left.
@property (nonatomic, copy) void (^ _Nullable rotateLeftHandler)(void);
/// Called by accessibility to rotate this label to the right.
@property (nonatomic, copy) void (^ _Nullable rotateRightHandler)(void);
/// Called by accessibility to change the text of this label.
@property (nonatomic, copy) void (^ _Nullable changeTextHandler)(void);
/// Called by accessibility to increase the bounding box.
@property (nonatomic, copy) void (^ _Nullable increaseBoundingBoxHandler)(void);
/// Called by accessibility to decrease the bounding box.
@property (nonatomic, copy) void (^ _Nullable decreaseBoundingBoxHandler)(void);
/// This property holds the normalized center of the view within the image without any crops added.
/// It is used to calculate the correct position of the label within the preview view.
@property (nonatomic) CGPoint normalizedCenter;
/// This property holds the normalized size of the view within the image.
@property (nonatomic) CGPoint normalizedSize;
/// Whether this label is currently selected.
@property (nonatomic) BOOL isSelected;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)accessibilityDecrement;
/// :nodoc:
- (void)accessibilityIncrement;
/// Perform a horizontal flip.
- (void)flipHorizontally;
/// Perform a vertical flip.
- (void)flipVertically;
@end


/// A <code>TextOptionsToolController</code> is reponsible for displaying the UI to adjust text that has been added
/// to an image.
SWIFT_CLASS_NAMED("TextOptionsToolController")
@interface PESDKTextOptionsToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)editViewControllerDidLayoutSubviews;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsScrollingInDefaultPreviewViewEnabled;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKTextOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKTextOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTextOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface PESDKTextOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTextOptionsToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end

enum TextOverlayAction : NSInteger;

/// Options for configuring a <code>TextOptionsToolController</code>.
SWIFT_CLASS_NAMED("TextOptionsToolControllerOptions")
@interface IMGLTextOptionsToolControllerOptions : PESDKToolControllerOptions
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable actionButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum TextAction);
/// This closure allows further configuration of the overlay actions. The closure is called for
/// each overlay and has the overlay and its corresponding enum value as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum TextOverlayAction);
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, readonly, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure is called when the user selects an action.
@property (nonatomic, readonly, copy) void (^ _Nullable textActionSelectedClosure)(enum TextAction);
/// This closure is called when the user selects an overlay action.
@property (nonatomic, readonly, copy) void (^ _Nullable overlayActionSelectedClosure)(enum TextOverlayAction);
/// Returns a newly allocated instance of <code>TextOptionsToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of <code>TextOptionsToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of <code>TextOptionsToolControllerOptions</code> using the given builder.
/// \param builder A <code>TextOptionsToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of <code>TextOptionsToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKTextOptionsToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>TextOptionsToolControllerOptionsBuilder</code> for <code>TextOptionsToolControllerOptions</code>.
SWIFT_CLASS_NAMED("TextOptionsToolControllerOptionsBuilder")
@interface PESDKTextOptionsToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// This closure allows further configuration of the action buttons. The closure is called for
/// each action button and has the button and its corresponding action as parameters.
@property (nonatomic, copy) void (^ _Nullable actionButtonConfigurationClosure)(UICollectionViewCell * _Nonnull, enum TextAction);
/// This closure allows further configuration of the overlay actions. The closure is called for
/// each overlay and has the overlay and its corresponding enum value as parameters.
@property (nonatomic, copy) void (^ _Nullable overlayButtonConfigurationClosure)(PESDKOverlayButton * _Nonnull, enum TextOverlayAction);
/// This closure allows further configuration of the right dragging handle which can be used
/// to resize the right side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable rightDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure allows further configuration of the left dragging handle which can be used
/// to resize the left side of the text’s bounding box.
@property (nonatomic, copy) void (^ _Nullable leftDraggingHandleConfigurationClosure)(UIImageView * _Nonnull);
/// This closure is called when the user selects an action.
@property (nonatomic, copy) void (^ _Nullable textActionSelectedClosure)(enum TextAction);
/// This closure is called when the user selects an overlay action.
@property (nonatomic, copy) void (^ _Nullable overlayActionSelectedClosure)(enum TextOverlayAction);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKTextOptionsToolControllerOptionsBuilder (SWIFT_EXTENSION(PhotoEditorSDK))
/// An array of <code>TextAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedTextActions</code> with the corresponding <code>TextAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedTextActionsAsNSNumbers;
/// An array of <code>TextOverlayActoin</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedTextOverlayActions</code> with the corresponding <code>TextOverlayAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedTextOverlayActionsAsNSNumbers;
@end

/// The overlay actions that can be used in an instance of <code>TextToolControllerOptions</code>.
/// <ul>
///   <li>
///     add:              Switch to the add text UI.
///   </li>
///   <li>
///     delete:           Delete the label.
///   </li>
///   <li>
///     undo:             Undo the latest operation.
///   </li>
///   <li>
///     redo:             Redo the latest operation.
///   </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, TextOverlayAction) {
/// Switch to the add text UI.
  TextOverlayActionAdd = 0,
/// Delete the label.
  TextOverlayActionDelete = 1,
/// Undo the latest operation.
  TextOverlayActionUndo = 2,
/// Redo the latest operation.
  TextOverlayActionRedo = 3,
};


/// A <code>TextToolController</code> is reponsible for displaying the UI to add text to an image.
SWIFT_CLASS_NAMED("TextToolController")
@interface PESDKTextToolController : PESDKPhotoEditToolController
/// When this property is set, the given text label will be updated instead of creating a new one.
@property (nonatomic, strong) PESDKTextLabel * _Nullable updateLabel;
/// :nodoc:
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
@end

@class UITextView;

@interface PESDKTextToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UITextViewDelegate>
/// :nodoc:
- (void)textViewDidChange:(UITextView * _Nonnull)textView;
@end


/// Options for configuring a <code>TextToolController</code>.
SWIFT_CLASS_NAMED("TextToolControllerOptions")
@interface PESDKTextToolControllerOptions : PESDKToolControllerOptions
/// Use this closure to configure the text input view.
/// Defaults to an empty implementation.
@property (nonatomic, readonly, copy) void (^ _Nullable textViewConfigurationClosure)(UITextView * _Nonnull);
/// The title of the tool when it is used to update an existing label.
@property (nonatomic, readonly, copy) NSString * _Nullable updateTitle;
/// The default color a newly created text has.
@property (nonatomic, readonly, strong) UIColor * _Nonnull defaultTextColor;
/// Returns a newly allocated instance of a <code>MainToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>MainToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>TextToolControllerOptions</code> using the given builder.
/// \param builder A <code>TextToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>TextToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKTextToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>TextToolControllerOptionsBuilder</code> for <code>TextToolControllerOptions</code>.
SWIFT_CLASS_NAMED("TextToolControllerOptionsBuilder")
@interface PESDKTextToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// Use this closure to configure the text input view.
@property (nonatomic, copy) void (^ _Nullable textViewConfigurationClosure)(UITextView * _Nonnull);
/// The title of the tool when it is used to update an existing label.
@property (nonatomic, copy) NSString * _Nullable updateTitle;
/// The default color a newly created text has.
@property (nonatomic, strong) UIColor * _Nonnull defaultTextColor;
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>Texture</code> manages an OpenGL texture. It is responsible for allocating and deallocting the necessary memory.
SWIFT_CLASS_NAMED("Texture")
@interface PESDKTexture : NSObject
/// The name of the texture.
@property (nonatomic, readonly) GLuint textureName;
/// Creates a new texture from the given image.
/// \param cgImage The image to create a texture for.
///
/// \param forceRGB Set to <code>true</code> if the image should be RGB, <code>false</code> otherwise.
///
- (nonnull instancetype)initWithCgImage:(CGImageRef _Nonnull)cgImage forceRGB:(BOOL)forceRGB OBJC_DESIGNATED_INITIALIZER;
/// Frees all allocated OpenGL resources.
- (void)freeGLResources;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end


@interface NSTimer (SWIFT_EXTENSION(PhotoEditorSDK))
@end





/// A <code>Toolbar</code> is used inside a <code>ToolbarController</code> to display <code>ToolbarItem</code>s.
SWIFT_CLASS_NAMED("Toolbar")
@interface PESDKToolbar : UIView
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
@property (nonatomic, readonly) CGSize intrinsicContentSize;
/// The toolbar items that are on the toolbar item stack.
@property (nonatomic, copy) NSArray<PESDKToolbarItem *> * _Nonnull items;
/// Updates the items that are on the toolbar item stack.
/// \param items The items to replace the toolbar item stack with.
///
/// \param animated Whether or not to animate the change.
///
- (void)setItems:(NSArray<PESDKToolbarItem *> * _Nullable)items animated:(BOOL)animated;
/// Pushes a toolbar item onto the toolbar item stack.
/// \param item The item to push onto the stack.
///
/// \param animated Whether or not to animate the change.
///
- (void)pushToolbarItem:(PESDKToolbarItem * _Nonnull)item animated:(BOOL)animated;
/// Pops the top toolbar item from the toolbar item stack.
/// \param animated Whether or not to animate the change.
///
///
/// returns:
/// The toolbar item that was popped from the stack, if any.
- (PESDKToolbarItem * _Nullable)popToolbarItemAnimated:(BOOL)animated;
@end


/// A <code>ToolbarButton</code> should be used within an instance of <code>Toolbar</code>. It automatically styles itself
/// to display touch events.
SWIFT_CLASS_NAMED("ToolbarButton")
@interface PESDKToolbarButton : PESDKButton
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// :nodoc:
@property (nonatomic, getter=isEnabled) BOOL enabled;
/// :nodoc:
- (void)setEnabled:(BOOL)enabled animated:(BOOL)animated;
/// :nodoc:
- (void)tintColorDidChange;
@end


/// A <code>ToolbarController</code> is the container view controller for a <code>PhotoEditViewController</code> and its
/// associated tool controllers. It usually displays a toolbar at bottom and has methods to transition
/// between various tools. If it is embedded inside a <code>UINavigationController</code> it uses the navigation
/// controllers navigation bar instead of its own toolbar at the bottom.
SWIFT_CLASS_NAMED("ToolbarController")
@interface PESDKToolbarController : UIViewController
/// The toolbar of this controller.
@property (nonatomic, readonly, strong) PESDKToolbar * _Nonnull toolbar;
/// The view controllers that are currently on the stack of the toolbar controller.
@property (nonatomic, readonly, copy) NSArray<UIViewController *> * _Nonnull viewControllers;
/// :nodoc:
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)willMoveToParentViewController:(UIViewController * _Nullable)parent;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillDisappear:(BOOL)animated;
/// :nodoc:
- (void)viewDidDisappear:(BOOL)animated;
/// :nodoc:
@property (nonatomic, readonly, strong) UIViewController * _Nullable childViewControllerForStatusBarStyle;
/// :nodoc:
@property (nonatomic, readonly, strong) UIViewController * _Nullable childViewControllerForStatusBarHidden;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
@property (nonatomic, readonly) BOOL shouldAutomaticallyForwardAppearanceMethods;
/// :nodoc:
- (void)showViewController:(UIViewController * _Nonnull)vc sender:(id _Nullable)sender;
/// Pushes a view controller on the stack and presents its view.
/// \param viewController The view controller to push.
///
/// \param animated Whether or not to animate the transition.
///
/// \param completion A completion handler to execute after the transition.
///
- (void)pushViewController:(UIViewController * _Nonnull)viewController animated:(BOOL)animated completion:(void (^ _Nullable)(void))completion;
/// Pops the top view controller from the stack and removes its view.
/// \param animated Whether or not to animate the transition.
///
/// \param completion A completion handler to execute after the transition.
///
///
/// returns:
/// The view controller that was popped from the stack, if any.
- (UIViewController * _Nullable)popViewControllerAnimated:(BOOL)animated completion:(void (^ _Nullable)(void))completion;
@end



/// A TooltipSlider object is a visual control used to select a single value from a continuous range of
/// values. Sliders are always displayed as horizontal bars. An indicator, or thumb, notes the
/// current value of the slider and can be moved by the user to change the setting.
/// A vertical indicator, or neutral point, notes the default, unchanged value of the slider.
/// Additionally a <code>TooltipSlider</code> also presents a tooltip above the thumb image that displays the current
/// selected value while dragging.
SWIFT_CLASS("_TtC14PhotoEditorSDK13TooltipSlider")
@interface TooltipSlider : PESDKSlider
/// The tooltip that is displayed above the thumb image.
@property (nonatomic, readonly, strong) SliderTooltip * _Nonnull tooltip;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// :nodoc:
- (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
@end


/// A <code>TouchingGestureRecognizer</code> is a simple <code>UIGestureRecognizer</code> subclass that counts the number
/// of touches on the associated view.
SWIFT_CLASS_NAMED("TouchingGestureRecognizer")
@interface PESDKTouchingGestureRecognizer : UIGestureRecognizer
/// :nodoc:
- (void)touchesBegan:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)event;
/// :nodoc:
- (void)touchesEnded:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)event;
/// :nodoc:
- (void)touchesCancelled:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)event;
/// :nodoc:
- (void)reset;
- (nonnull instancetype)initWithTarget:(id _Nullable)target action:(SEL _Nullable)action OBJC_DESIGNATED_INITIALIZER;
@end

/// Describes all available transform actions.
typedef SWIFT_ENUM(NSInteger, TransformAction) {
/// Rotate the image to the left.
  TransformActionRotateLeft = 0,
/// Flip the image horizontally.
  TransformActionFlipHorizontally = 1,
/// Straightens the image.
  TransformActionStraighten = 2,
};

@protocol UIViewControllerTransitionCoordinator;

/// A <code>TransformToolController</code> is reponsible for displaying the UI to transform an image.
SWIFT_CLASS_NAMED("TransformToolController")
@interface PESDKTransformToolController : PESDKStackLayoutToolController
/// :nodoc:
- (void)viewDidLoad;
/// :nodoc:
- (void)viewWillAppear:(BOOL)animated;
/// :nodoc:
- (void)viewDidAppear:(BOOL)animated;
/// :nodoc:
- (void)viewWillLayoutSubviews;
/// :nodoc:
- (void)viewDidLayoutSubviews;
/// :nodoc:
- (void)updateViewConstraints;
/// :nodoc:
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator> _Nonnull)coordinator;
/// :nodoc:
@property (nonatomic, readonly) UIEdgeInsets preferredPreviewViewInsets;
/// :nodoc:
@property (nonatomic, readonly) BOOL wantsDefaultPreviewView;
- (void)willBecomeActiveTool;
/// :nodoc:
- (void)didBecomeActiveTool;
/// :nodoc:
- (void)willResignActiveTool;
/// :nodoc:
- (void)didResignActiveTool;
/// :nodoc:
- (void)photoEditModelDidChange;
- (nonnull instancetype)initWithConfiguration:(PESDKConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UIGestureRecognizerDelegate>
/// :nodoc:
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)otherGestureRecognizer SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKScalePickerDelegate>
/// :nodoc:
- (void)scalePicker:(CGFloat)value didChangeValue:(PESDKScalePicker * _Nonnull)scalePicker;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegate>
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
/// :nodoc:
- (void)collectionView:(UICollectionView * _Nonnull)collectionView didDeselectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDelegateFlowLayout>
/// :nodoc:
- (UIEdgeInsets)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout insetForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (CGSize)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <PESDKCropAndStraightenViewDelegate>
/// :nodoc:
- (void)cropAndStraightenViewWillBeginTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// :nodoc:
- (void)cropAndStraightenViewDidEndTracking:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
/// :nodoc:
- (void)cropAndStraightenViewDidTrack:(PESDKCropAndStraightenView * _Nonnull)cropAndStraightenView;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK)) <UICollectionViewDataSource>
/// :nodoc:
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
@end


@interface PESDKTransformToolController (SWIFT_EXTENSION(PhotoEditorSDK))
@end


/// Options for configuring a <code>TransformToolController</code>.
SWIFT_CLASS_NAMED("TransformToolControllerOptions")
@interface PESDKTransformToolControllerOptions : PESDKToolControllerOptions
/// Whether to allow free cropping. If this is enabled, ‘Free’ is always the first available option.
/// Defaults to <code>true</code>.
@property (nonatomic, readonly) BOOL allowFreeCrop;
/// Defines all allowed crop aspects. The crop aspect buttons are shown in the given order.
/// Defaults to <code>1:1</code>, <code>16:9</code>, <code>4:3</code> and <code>3:2</code>.
@property (nonatomic, readonly, copy) NSArray<PESDKCropAspect *> * _Nonnull allowedCropAspects;
/// This closure allows further configuration of the crop aspect buttons. The closure is called for
/// each crop aspect button and has the button and its corresponding crop aspect as parameters.
@property (nonatomic, readonly, copy) void (^ _Nullable cropAspectButtonConfigurationClosure)(PESDKLabelBorderedCollectionViewCell * _Nonnull, PESDKCropAspect * _Nullable);
/// This closure is called every time the user selects a crop aspect.
@property (nonatomic, readonly, copy) void (^ _Nullable cropAspectSelectedClosure)(PESDKCropAspect * _Nullable);
/// This closure allows further configuration of the transform buttons, i.e. rotate left and flip. The closure is called for
/// each button and has the button and its corresponding transform action as parameters.
/// The scalepicker to choose the straighten angle, has its own configuration closeure.
@property (nonatomic, readonly, copy) void (^ _Nullable transformButtonConfigurationClosure)(PESDKButton * _Nonnull, enum TransformAction);
/// This closure alloes further configuration of the scale picker. This UI element is used to
/// choose the straighten angle.
@property (nonatomic, readonly, copy) void (^ _Nullable scalePickerConfigurationClosure)(PESDKScalePicker * _Nonnull);
/// Returns a newly allocated instance of a <code>TransformToolControllerOptions</code> using the default builder.
///
/// returns:
/// An instance of a <code>TransformToolControllerOptions</code>.
- (nonnull instancetype)init;
/// Returns a newly allocated instance of a <code>TransformToolControllerOptions</code> using the given builder.
/// \param builder A <code>TransformToolControllerOptionsBuilder</code> instance.
///
///
/// returns:
/// An instance of a <code>TransformToolControllerOptions</code>.
- (nonnull instancetype)initWithBuilder:(PESDKTransformToolControllerOptionsBuilder * _Nonnull)builder OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithEditorBuilder:(PESDKToolControllerOptionsBuilder * _Nonnull)editorBuilder SWIFT_UNAVAILABLE;
@end


/// The default <code>TransformToolControllerOptionsBuilder</code> for <code>TransformToolControllerOptions</code>.
SWIFT_CLASS_NAMED("TransformToolControllerOptionsBuilder")
@interface PESDKTransformToolControllerOptionsBuilder : PESDKToolControllerOptionsBuilder
/// Whether to allow free cropping. If this is enabled, ‘Free’ is always the first available option.
/// Defaults to <code>true</code>.
@property (nonatomic) BOOL allowFreeCrop;
/// Defines all allowed crop aspects. The crop aspect buttons are shown in the given order.
/// Defaults to <code>1:1</code>, <code>16:9</code>, <code>4:3</code> and <code>3:2</code>.
@property (nonatomic, copy) NSArray<PESDKCropAspect *> * _Nonnull allowedCropRatios;
/// This closure allows further configuration of the transform buttons, i.e. rotate left and flip. The closure is called for
/// each button and has the button and its corresponding transform action as parameters.
@property (nonatomic, copy) void (^ _Nullable transformButtonConfigurationClosure)(PESDKButton * _Nonnull, enum TransformAction);
/// An array of <code>TransformAction</code> raw values wrapped in NSNumbers.
/// Setting this property overrides any previously set values in
/// <code>allowedTransformActions</code> with the corresponding <code>TransformAction</code> values.
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull allowedTransformActionsAsNSNumbers;
/// This closure allows further configuration of the crop aspect buttons. The closure is called for
/// each crop aspect button and has the button and its corresponding crop aspect as parameters.
@property (nonatomic, copy) void (^ _Nullable cropAspectButtonConfigurationClosure)(PESDKLabelBorderedCollectionViewCell * _Nonnull, PESDKCropAspect * _Nullable);
/// This closure is called every time the user     /// This closure is called every time the user selects a crop aspect.
@property (nonatomic, copy) void (^ _Nullable cropAspectSelectedClosure)(PESDKCropAspect * _Nullable);
/// This closure alloes further configuration of the scale picker. This UI element is used to
/// choose the straighten angle.
@property (nonatomic, copy) void (^ _Nullable scalePickerConfigurationClosure)(PESDKScalePicker * _Nonnull);
/// :nodoc:
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


@interface UIApplication (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UICollectionView (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UICollectionViewCell (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIColor (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIColor (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIDevice (SWIFT_EXTENSION(PhotoEditorSDK))
/// Checks if the device is too old for our new blur.
@property (nonatomic, readonly) BOOL isTooOldForLensBlurPreview;
@end


@interface UIImage (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIImage (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIImage (SWIFT_EXTENSION(PhotoEditorSDK))
/// Creates a lower resolution version of an image.
/// \param dimension The maximum dimension of the image.
///
///
/// returns:
/// A lower resolution version of an image.
- (UIImage * _Nonnull)downsampleWithMaxDimension:(CGFloat)dimension SWIFT_WARN_UNUSED_RESULT;
/// Resizes an image to a given size with a given interpolation quality.
/// \param newSize The size of the new image.
///
/// \param quality The interpolation quality.
///
///
/// returns:
/// A resized image.
- (UIImage * _Nonnull)resizedImageTo:(CGSize)newSize interpolationQuality:(CGInterpolationQuality)quality SWIFT_WARN_UNUSED_RESULT;
/// Resizes an image to a given size with a given interpolation quality, applies a transform and
/// optionally draws the image transposed.
/// \param newSize The size of the new image.
///
/// \param transform The transform to apply to the image.
///
/// \param transpose Set to <code>true</code> if the image should be drawn transposed, <code>false</code> otherweise.
///
/// \param quality The interpolation quality.
///
///
/// returns:
/// A resized and transformed image.
- (UIImage * _Nonnull)resizedImageTo:(CGSize)newSize transform:(CGAffineTransform)transform drawTransposed:(BOOL)transpose interpolationQuality:(CGInterpolationQuality)quality SWIFT_WARN_UNUSED_RESULT;
/// Returns a copy of the image, taking into account its orientation
@property (nonatomic, readonly, strong) UIImage * _Nonnull pesdk_normalizedImage;
/// Returns a rescaled copy of the image, taking into account its orientation
/// <ul>
///   <li>
///     discussion: The image will be scaled disproportionately if necessary to fit the bounds specified by the parameter.
///   </li>
/// </ul>
/// \param size The size of the rescaled image.
///
///
/// returns:
/// The rescaled image.
- (UIImage * _Nonnull)pesdk_normalizedImageOfSize:(CGSize)size SWIFT_WARN_UNUSED_RESULT;
/// Returns a copy of the image, that has <code>UIEdgeInsets</code> set, based on the informations give within a 9 patch image.
/// \param image An image must be a standard 9 patch image.
///
///
/// returns:
/// An image that is rescaleable based on the information given by the input image.
- (UIImage * _Nonnull)pesdk_resizableImageFrom9Patch:(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
/// Draws the receiver’s in the given rect with the given content mode.
/// \param rect The rect to draw into.
///
/// \param contentMode The content mode to use for drawing.
///
- (void)pesdk_drawInRect:(CGRect)rect withContentMode:(UIViewContentMode)contentMode;
/// Returns a colored version of the image.
/// \param tint The color to colorize the image.
///
///
/// returns:
/// The colored image.
- (UIImage * _Nonnull)imageWithTint:(UIColor * _Nonnull)tint SWIFT_WARN_UNUSED_RESULT;
@end


@interface UIImageView (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIScrollView (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UITableView (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UITableViewCell (SWIFT_EXTENSION(PhotoEditorSDK))
@end


@interface UIViewController (SWIFT_EXTENSION(PhotoEditorSDK))
/// The toolbar controller that this view controller is embedded in, if any.
@property (nonatomic, readonly, strong) PESDKToolbarController * _Nullable toolbarController;
@end


/// <code>UndoController</code> is a general-purpose recorder of operations for undo and redo.
/// note:
/// You register an undo operation by specifying the object that’s changing (or the owner
/// of that object), along with a method to invoke to revert its state, and the arguments for that
/// method. When performing undo an <code>UndoController</code> saves the operations reverted so that you can redo
/// the undos.
/// It differs from Foundation’s <code>NSUndoManager</code> in that groups are not created automatically for
/// each cycle of the run loop and that each step of a group can be undone rather than just the
/// whole group.
SWIFT_CLASS_NAMED("UndoController")
@interface PESDKUndoController : NSObject
/// A Boolean value that indicates whether the receiver is enabled and undo operations can be
/// registered.
@property (nonatomic) BOOL isEnabled;
/// Returns a Boolean value that indicates whether the receiver is in the process of performing
/// its <code>undo()</code>, <code>undoStep()</code>, <code>undoStepInCurrentGroup()</code>, <code>undoAllInCurrentGroup()</code> or
/// <code>undoGroup()</code> method.
@property (nonatomic, readonly) BOOL isUndoing;
/// Returns a Boolean value that indicates whether the receiver is in the process of performing
/// its <code>redo()</code> method.
@property (nonatomic, readonly) BOOL isRedoing;
/// Marks the beginning of an undo group.
- (void)beginUndoGrouping;
/// Marks the end of an undo group.
- (void)endUndoGrouping;
/// Clears the undo and redo stacks.
- (void)removeAllActions;
/// Clears the undo and redo stacks for the current group.
- (void)removeAllActionsInCurrentGroup;
/// A Boolean value that indicates whether the receiver has any actions to undo.
@property (nonatomic, readonly) BOOL canUndo;
/// A Boolean value that indicates whether the receiver has any actions to undo in the current
/// group.
@property (nonatomic, readonly) BOOL canUndoInCurrentGroup;
/// If the last undo operation on the undo stack is a group, this method performs the undo
/// operations of the whole group, if it is a single operation it performs only that operation.
- (void)undo;
/// Performs the latest undo operation only.
- (void)undoStep;
/// Performs the latest undo operation in the current group. If the group contains a nested group
/// it performs the undo operations of the whole nested group.
- (void)undoStepInCurrentGroup;
/// Performs all undo operations in the current group.
- (void)undoAllInCurrentGroup;
/// Performs the undo operations of the latest group. If the top item on the undo stack is not
/// the ending of a group, this method throws an exception.
- (void)undoGroup;
/// A Boolean value that indicates whether the receiver has any actions to redo.
@property (nonatomic, readonly) BOOL canRedo;
/// A Boolean value that indicates whether the receiver has any actions to redo in the current
/// group.
@property (nonatomic, readonly) BOOL canRedoInCurrentGroup;
/// Performs the operations in the last group on the redo stack, if there are any, recording
/// them on the undo stack as a single group.
- (void)redo;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end


/// A <code>VideoRecordButton</code> is a button that can be used to start a video recording. It animates between
/// a ‘Start recording’ and a ‘Stop recording’ state.
SWIFT_CLASS("_TtC14PhotoEditorSDK17VideoRecordButton")
@interface VideoRecordButton : UIControl
/// Whether or not the button is currently in recording mode.
@property (nonatomic) BOOL isRecording;
/// :nodoc:
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
/// :nodoc:
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// :nodoc:
- (void)layoutSubviews;
/// :nodoc:
- (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
/// :nodoc:
- (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
/// :nodoc:
- (void)cancelTrackingWithEvent:(UIEvent * _Nullable)event;
@end


/// A view that extends the default <code>UIView</code> by passthrough views.
SWIFT_CLASS_NAMED("View")
@interface PESDKView : UIView
/// An array of views that the user can interact with while the view is above.
@property (nonatomic, copy) NSArray<UIView *> * _Nonnull passthroughViews;
/// :nodoc:
- (UIView * _Nullable)hitTest:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


/// This class provides tools to create and manipulate color matrices.
/// These can be passed into a CIKernel.
SWIFT_CLASS_NAMED("_ObjCColorMatrix")
@interface PESDKColorMatrix : NSObject
/// This array contains the data of the matrix.
@property (nonatomic, readonly, copy) NSArray<NSNumber *> * _Nonnull data;
/// Creates a new identity matrix.
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Creates a new matrix containing the given data.
/// \param data The data to initialize the color matrix with.
///
- (nonnull instancetype)initWithData:(NSArray<NSNumber *> * _Nonnull)data OBJC_DESIGNATED_INITIALIZER;
/// Creates a new exposure matrix.
/// \param exposure The desired exposure. This value ranges from -1 to 1.
///
- (nonnull instancetype)initWithExposure:(CGFloat)exposure OBJC_DESIGNATED_INITIALIZER;
/// Creates a new contrast matrix.
/// \param contrast The desired contrast. This value ranges from -1 to 1.
///
- (nonnull instancetype)initWithContrast:(CGFloat)contrast OBJC_DESIGNATED_INITIALIZER;
/// Creates a new saturation matrix.
/// \param saturation The desired saturation. This value ranges from -1 to 1.
///
- (nonnull instancetype)initWithSaturation:(CGFloat)saturation OBJC_DESIGNATED_INITIALIZER;
/// Creates a new brightness matrix.
/// \param brightness The desired brightness. This value ranges from -1 to 1.
///
- (nonnull instancetype)initWithBrightness:(CGFloat)brightness OBJC_DESIGNATED_INITIALIZER;
/// Combines the color matrix with another color matrix.
/// \param matrix The color matrix to concatenate to this matrix.
///
- (void)concatenate:(PESDKColorMatrix * _Nonnull)matrix;
/// Combines the color matrix with another color matrix and returns the new matrix.
/// \param matrix The color matrix to concatenate to this matrix.
///
///
/// returns:
/// The new matrix.
- (PESDKColorMatrix * _Nonnull)concatenating:(PESDKColorMatrix * _Nonnull)matrix SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>_ObjCMenuItem</code> wraps a <code>MenuItem</code> so that it can be used from Objective-C. Please see the
/// documentation of <code>MenuItem</code> for more details.
SWIFT_CLASS_NAMED("_ObjCMenuItem")
@interface PESDKMenuItem : NSObject
/// Creates a menu item for a tool.
/// \param title The title of the tool.
///
/// \param icon The icon of the tool.
///
/// \param tool The tool to present when this menu item is selected.
///
- (nonnull instancetype)initWithTitle:(NSString * _Nonnull)title icon:(UIImage * _Nonnull)icon tool:(PESDKPhotoEditToolController * _Nonnull)tool OBJC_DESIGNATED_INITIALIZER;
/// Creates a menu item for an action.
/// \param title The title of the action.
///
/// \param icon The icon of the action.
///
/// \param action The action to execute when this menu item is selected.
///
/// \param state An optional closure to call to get the enabled/disabled state of the action.
///
- (nonnull instancetype)initWithTitle:(NSString * _Nonnull)title icon:(UIImage * _Nonnull)icon action:(PESDKPhotoEditModel * _Nonnull (^ _Nonnull)(PESDKPhotoEditModel * _Nonnull))action state:(BOOL (^ _Nullable)(PESDKPhotoEditModel * _Nonnull))state OBJC_DESIGNATED_INITIALIZER;
/// Creates a separator menu item.
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// The title of the boxed menu item, if any.
@property (nonatomic, readonly, copy) NSString * _Nullable title;
/// The icon of the menu item, if any.
@property (nonatomic, readonly, strong) UIImage * _Nullable icon;
/// The tool of the menu item, if any.
@property (nonatomic, readonly, strong) PESDKPhotoEditToolController * _Nullable tool;
/// The action of the menu item, if any.
@property (nonatomic, readonly, copy) PESDKPhotoEditModel * _Nonnull (^ _Nullable action)(PESDKPhotoEditModel * _Nonnull);
/// The closure to call to get the enabled/disabled state of the action, if any.
@property (nonatomic, readonly, copy) BOOL (^ _Nullable state)(PESDKPhotoEditModel * _Nonnull);
/// Creates a boxed version of the default menu items.
/// \param configuration The configuration instance to use to configure the default menu items.
///
///
/// returns:
/// A boxed version of the default menu items.
+ (NSArray<PESDKMenuItem *> * _Nonnull)defaultItemsWithConfiguration:(PESDKConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
@end


/// A <code>_ObjCPhotoEditModel</code> holds information about any modification that should be applied to an image.
/// The actual <code>PhotoEditModel</code> is a struct and not exposable to Objective-C. This class boxes the actual
/// <code>PhotoEditModel</code> for Objective-C compatibility.
SWIFT_CLASS_NAMED("_ObjCPhotoEditModel")
@interface PESDKPhotoEditModel : NSObject
/// Creates a default photo edit model.
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// The orientation of the image.
@property (nonatomic) enum PESDKOrientation appliedOrientation;
/// Enable auto enhancement.
@property (nonatomic) BOOL isAutoEnhancementEnabled;
/// The brightness of the image.
@property (nonatomic) float brightness;
/// The contrast of the image.
@property (nonatomic) float contrast;
/// The shadow amount of the image.
@property (nonatomic) float shadows;
/// The highlights amount of the image.
@property (nonatomic) float highlights;
/// The exposure amount of the image.
@property (nonatomic) float exposure;
/// The clarity amount of the image.
@property (nonatomic) float clarity;
/// The identifier of the effect filter to apply to the image.
@property (nonatomic, copy) NSString * _Nonnull effectFilterIdentifier;
/// The intensity of the effect filter.
@property (nonatomic) float effectFilterIntensity;
/// The first normalized control point of the focus. This control point should use the coordinate
/// system of Core Image, which means that (0, 0) is at the top left.
@property (nonatomic) CGPoint focusNormalizedControlPoint1;
/// The second normalized control point of the focus. This control point should use the coordinate
/// system of Core Image, which means that (0, 0) is at the top left.
@property (nonatomic) CGPoint focusNormalizedControlPoint2;
/// The blur radius to use for focus. Default is 0.015. This value is relative to the shorter side of the image.
@property (nonatomic) float focusBlurRadius;
/// The normalized fade width to use for focus. Default is 0.1.
@property (nonatomic) float focusNormalizedFadeWidth;
/// The <code>PESDKFocusType</code> to apply to the image.
@property (nonatomic) enum PESDKFocusType focusType;
/// This property is <code>true</code> if the image has neither been cropped nor rotated.
@property (nonatomic, readonly) BOOL isGeometryIdentity;
/// The normalized crop rect of the image.
@property (nonatomic) CGRect normalizedCropRect;
/// An image that should be placed on top of the input image after all other effects have been applied.
@property (nonatomic, strong) CIImage * _Nullable spriteImage;
/// The saturation of the image.
@property (nonatomic) float saturation;
/// The straighten angle of the image.
@property (nonatomic) float straightenAngle;
/// The amount by which the image should be inset (this is used when a frame is applied to make
/// the image fit inside the frame). The inset is specified as a value relative to the smaller
/// side of the image.
@property (nonatomic) UIEdgeInsets imageInsets;
/// An image that should be placed between the input image and the <code>overlayImage</code>.
@property (nonatomic, copy) NSString * _Nonnull overlayIdentifier;
/// The blend mode that is use to apply the overlay image.
@property (nonatomic) enum PESDKBlendMode overlayBlendMode;
/// A value between 0 and 1, that determins the intensity that is used to render the overlay.
@property (nonatomic) float overlayIntensity;
/// The quality that should be used to blur the image. Low is used during preview, high during export.
@property (nonatomic) enum BlurQuality blurQuality;
/// The identity orientation of a photo edit model.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) enum PESDKOrientation identityOrientation;)
+ (enum PESDKOrientation)identityOrientation SWIFT_WARN_UNUSED_RESULT;
/// The identity cropping area of a photo edit model.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) CGRect identityNormalizedCropRect;)
+ (CGRect)identityNormalizedCropRect SWIFT_WARN_UNUSED_RESULT;
@end

#pragma clang diagnostic pop
