//
//  UITextField+YSRACSignalSupport.h
//  ReactiveObjC
//
//  Created by Josh Abernathy on 4/17/12.
//  Copyright (c) 2012 GitHub, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>

@class YSRACChannelTerminal<ValueType>;
@class YSRACSignal<__covariant ValueType>;

NS_ASSUME_NONNULL_BEGIN

@interface UITextField (YSRACSignalSupport)

/// Creates and returns a signal for the text of the field. It always starts with
/// the current text. The signal sends next when the UIControlEventAllEditingEvents
/// control event is fired on the control.
- (YSRACSignal<NSString *> *)ysrac_textSignal;

/// Creates a new YSRACChannel-based binding to the receiver.
///
/// Returns a YSRACChannelTerminal that sends the receiver's text whenever the
/// UIControlEventAllEditingEvents control event is fired, and sets the text
/// to the values it receives.
- (YSRACChannelTerminal<NSString *> *)ysrac_newTextChannel;

@end

NS_ASSUME_NONNULL_END
