//
//  UISegmentedControl+YSRACSignalSupport.h
//  ReactiveObjC
//
//  Created by Uri Baghin on 20/07/2013.
//  Copyright (c) 2013 GitHub, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>

@class YSRACChannelTerminal<ValueType>;

NS_ASSUME_NONNULL_BEGIN

@interface UISegmentedControl (YSRACSignalSupport)

/// Creates a new YSRACChannel-based binding to the receiver.
///
/// nilValue - The segment to select when the terminal receives `nil`.
///
/// Returns a YSRACChannelTerminal that sends the receiver's currently selected
/// segment's index whenever the UIControlEventValueChanged control event is
/// fired, and sets the selected segment index to the values it receives.
- (YSRACChannelTerminal<NSNumber *> *)ysrac_newSelectedSegmentIndexChannelWithNilValue:(nullable NSNumber *)nilValue;

@end

NS_ASSUME_NONNULL_END
