//
//  TimePickerPopupView.h
//  kneet2
//
//  Created by Jason Lee on 11/24/15.
//  Copyright (c) 2015 ntels. All rights reserved.
//

@import UIKit;
#import "CustomAlertView.h"
#import "JDViewController.h"

@class CustomCheckBox;
@class CustomTextField;

@interface CustomTimePicker : UIDatePicker {
    BOOL _changed;
}

@end

@interface TimePickerPopupView : CustomAlertView

@property (weak, nonatomic) ItemModel *timeTrigger;
@property (weak, nonatomic) NSMutableArray<ItemModel> *refConditions;
@property (weak, nonatomic) IBOutlet CustomButton *btnMorning;  // 오전 버튼
@property (weak, nonatomic) IBOutlet CustomButton *btnAfternoon;  // 오후 버튼
@property (weak, nonatomic) IBOutlet CustomTextField *txtHour;  // 시간 입력
@property (weak, nonatomic) IBOutlet CustomTextField *txtMinute;  // 분 입력

//properties
@property (weak, nonatomic) IBOutlet CustomTimePicker *timePicker;
@property (strong, nonatomic) IBOutletCollection(CustomCheckBox) NSArray *chkDays;


//methods
- (id)initFromNib;
+ (NSString *)daysOfWeek:(NSArray *)chkDays;
+ (NSString *)daysOfWeekValue:(NSArray *)chkDays;
+ (BOOL)validateCondition:(NSArray *)chkDays;
+ (void)setDaysCondition:(NSMutableArray<ItemModel> *)conditions chkDays:(NSArray *)chkDays;
+ (void)setRefConditions:(NSMutableArray<ItemModel> *)refConditions chkDays:(NSArray *)chkDays;

@end
