//
//  KWMNewGiftCardVC.m
//  iCemarose
//
//  Created by HouWeiBin on 2017/1/23.
//  Copyright © 2017年 kollway. All rights reserved.
//

#import "KWMNewGiftCardVC.h"

@interface KWMNewGiftCardVC ()

@end

@implementation KWMNewGiftCardVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.tbvGiftCard registerNib:[UINib nibWithNibName:@"KWMNewGiftCardCell" bundle:nil] forCellReuseIdentifier:@"KWMNewGiftCardCell"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

+(NSString *)kwmTag{
    return @"KWMNewGiftCardVC";
}

-(void)loadData{

}

-(void)reLoadData{
   
}

-(UITableView *)targetTableView{
    return self.tbvGiftCard;
}

-(void)kwm_onClickAddGift:(BUYCheckout *)checkout{
    self.checkout = checkout;
    [self.tbvGiftCard reloadData];
    if(self.delegate != nil){
        [self.delegate kwm_addedGiftCard:checkout];
    }
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 20;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 100;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    KWMNewGiftCardCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KWMNewGiftCardCell"];
//    cell.delegate = self;
//    if(self.checkout!=nil&&self.checkout.giftCardsArray!=nil){
//        BUYGiftCard *giftCard = [self.checkout.giftCardsArray objectAtIndex:indexPath.row];
//        [cell setData:giftCard];
//    }
    return cell;
}


@end