//  CalendarView.h

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class CalendarView;

@protocol CalendarViewDelegate <NSObject>
- (void)calendarView:(CalendarView *)calendar didSelectDate:(NSDate *)date;
- (void)calendarViewMonthChanged:(NSDate *)monthFirstDay;
@end

@interface CalendarView : UIView

@property (nonatomic, weak) id<CalendarViewDelegate> delegate;

// minDate disables earlier days
@property (nonatomic, strong) NSDate *minDate;

// markedDates: NSDictionary keyed by "yyyy-MM-dd" -> @{ @"status": @"available"/@"limited"/@"unavailable" }
@property (nonatomic, copy) NSDictionary<NSString*, NSDictionary*> *markedDates;

// currently selected date
@property (nonatomic, strong, nullable) NSDate *selectedDate;

@property (nonatomic, strong, readonly) UICollectionView *collectionView;

// set starting month (default = today)
- (void)setDisplayedMonth:(NSDate *)monthAnimated:(BOOL)animated;

@end

NS_ASSUME_NONNULL_END

