//
// RoomBasedSelectionViewController.h
// IvyMedia
//
// Created by haibara on 9/26/14.
//
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "RoomBasedPrice.h"

@interface RoomBasedCountData : NSObject

@property (nonatomic, assign) NSInteger roomNo;
@property (nonatomic, assign) NSInteger adultCount;
@property (nonatomic, assign) NSInteger childCount;
@property (nonatomic, assign) NSInteger infantCount;
@property (nonatomic, strong, readonly) NSArray *childAges;
@property (nonatomic, assign, readonly) NSInteger peopleCount;

- (instancetype)initWithRoomNo:(NSInteger)roomNo;

- (void)configureWithRoomBasedPrice:(RoomBasedPrice *)price;

@end

@interface RoomBasedCountViewController : UITableViewController

@property (nonatomic, assign) BOOL childEnabled;
@property (nonatomic, assign, readonly) BOOL childAgeEnabled;
@property (nonatomic, assign) BOOL infantEnabled;
@property (nonatomic, assign) NSInteger minimumPeopleCount;
@property (nonatomic, assign) NSInteger maximumPeopleCount;
@property (nonatomic, assign) NSInteger minimumAdultCount;
@property (nonatomic, assign) NSInteger maximumAdultCount;
@property (nonatomic, assign) NSInteger maximumChildCount;
@property (nonatomic, assign) NSInteger maximumInfantCount;
@property (nonatomic, assign) NSInteger minimumChildAge;
@property (nonatomic, assign) NSInteger maximumChildAge;
@property (nonatomic, assign) NSInteger preferredChildAge;
@property (nonatomic, assign) NSInteger peoleMinimum;
@property (nonatomic, assign) NSInteger maxPeople;

- (instancetype)initWithRoomBasedCountDatas:(NSArray *)countDatas;

- (void)setPropertiesWithRoomBasedPrice:(RoomBasedPrice *)price;

- (void)setDidDoneBlock:(void (^) (NSArray *countDatas))block;
- (void)setDidCancelBlock:(void (^) (void))block;

@end
