1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #import <UIKit/UIKit.h>
9 
10 #import <ABI48_0_0React/ABI48_0_0RCTView.h>
11 
12 #import "ABI48_0_0RCTBackedTextInputDelegate.h"
13 #import "ABI48_0_0RCTBackedTextInputViewProtocol.h"
14 
15 @class ABI48_0_0RCTBridge;
16 @class ABI48_0_0RCTTextAttributes;
17 @class ABI48_0_0RCTTextSelection;
18 
19 NS_ASSUME_NONNULL_BEGIN
20 
21 @interface ABI48_0_0RCTBaseTextInputView : ABI48_0_0RCTView <ABI48_0_0RCTBackedTextInputDelegate>
22 
23 - (instancetype)initWithBridge:(ABI48_0_0RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
24 
25 - (instancetype)init NS_UNAVAILABLE;
26 - (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
27 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
28 
29 @property (nonatomic, readonly) UIView<ABI48_0_0RCTBackedTextInputViewProtocol> *backedTextInputView;
30 
31 @property (nonatomic, strong, nullable) ABI48_0_0RCTTextAttributes *textAttributes;
32 @property (nonatomic, assign) UIEdgeInsets ABI48_0_0ReactPaddingInsets;
33 @property (nonatomic, assign) UIEdgeInsets ABI48_0_0ReactBorderInsets;
34 
35 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onContentSizeChange;
36 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onSelectionChange;
37 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onChange;
38 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onChangeSync;
39 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onTextInput;
40 @property (nonatomic, copy, nullable) ABI48_0_0RCTDirectEventBlock onScroll;
41 
42 @property (nonatomic, assign) NSInteger mostRecentEventCount;
43 @property (nonatomic, assign, readonly) NSInteger nativeEventCount;
44 @property (nonatomic, assign) BOOL autoFocus;
45 @property (nonatomic, copy) NSString *submitBehavior;
46 @property (nonatomic, assign) BOOL selectTextOnFocus;
47 @property (nonatomic, assign) BOOL clearTextOnFocus;
48 @property (nonatomic, assign) BOOL secureTextEntry;
49 @property (nonatomic, copy) ABI48_0_0RCTTextSelection *selection;
50 @property (nonatomic, strong, nullable) NSNumber *maxLength;
51 @property (nonatomic, copy, nullable) NSAttributedString *attributedText;
52 @property (nonatomic, copy) NSString *inputAccessoryViewID;
53 @property (nonatomic, assign) UIKeyboardType keyboardType;
54 @property (nonatomic, assign) BOOL showSoftInputOnFocus;
55 
56 /**
57  Sets selection intext input if both start and end are within range of the text input.
58  **/
59 - (void)setSelectionStart:(NSInteger)start selectionEnd:(NSInteger)end;
60 
61 @end
62 
63 NS_ASSUME_NONNULL_END
64