






#import "HisNicknameRelationsPutRefusedViewController.h"
#import "ActionOffViewController.h"
#import "RomanianPullWhoHighlightKitCell.h"

@interface HisNicknameRelationsPutRefusedViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) UIView *grayUnorderedNodeJobFinalizeView;

@property (nonatomic, strong) UIView *civilFootView;

@property (nonatomic, strong) UITableView *downNotifyView;


@property (nonatomic, assign) BOOL selectorsMapBeginGroupAttribute;

@property (nonatomic, weak) id guideChainSort;

@property (nonatomic, strong) NSMutableArray *bondExchangesArray;

@property (nonatomic, strong) NSMutableArray *minimizeArray;

@property (nonatomic, strong) UIButton *justBadYouButton;
@property (nonatomic, strong) UIButton *denyTeamAreButton;

@end

@implementation HisNicknameRelationsPutRefusedViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (_minimizeArray.count > 0 && self.selectorsMapBeginGroupAttribute) {
        self.selectorsMapBeginGroupAttribute = NO;
    }
}

- (void)viewWillAppear:(BOOL)animated {
    
    [self.view mas_makeConstraints:^(MASConstraintMaker *make) {
        CGFloat bottom = RuleListCut.coloredDraft.capShakeSlow;
        make.centerX.equalTo(self.view.superview);
        make.centerY.equalTo(self.view.superview).offset(+bottom/2);
        make.height.mas_equalTo([RuleListCut insertedPickEnumerateDownloadBusHandshakeSize].height+bottom);
        make.width.mas_equalTo([RuleListCut insertedPickEnumerateDownloadBusHandshakeSize].width);
    }];
}

- (void)setSelectorsMapBeginGroupAttribute:(BOOL)selectorsMapBeginGroupAttribute {
    
    _selectorsMapBeginGroupAttribute = selectorsMapBeginGroupAttribute;
    
    _minimizeArray = selectorsMapBeginGroupAttribute ? _bondExchangesArray : [NSMutableArray arrayWithObject:_guideChainSort];
    
    [self.downNotifyView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(!selectorsMapBeginGroupAttribute ? RuleListCut.coloredDraft.sayPrettyJob : self.minimizeArray.count > 3 ? 3 * RuleListCut.coloredDraft.sayPrettyJob  : self.minimizeArray.count * RuleListCut.coloredDraft.sayPrettyJob);
    }];
    
    self.downNotifyView.scrollEnabled = selectorsMapBeginGroupAttribute;
    
    [self.downNotifyView reloadData];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.002 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.downNotifyView setContentOffset:CGPointMake(0, 0) animated:NO];
    });
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = UIColor.clearColor;
    
    _bondExchangesArray = [[RuleListCut selectBarSampleNewsstandResting] mutableCopy];
    
    _guideChainSort = _bondExchangesArray.firstObject;
    
    [self hitSeekVitalityConstantMore];
    
    self.selectorsMapBeginGroupAttribute = NO;
}

- (void)hitSeekVitalityConstantMore {
    
    _grayUnorderedNodeJobFinalizeView = [[UIView alloc] init];
    
    _grayUnorderedNodeJobFinalizeView.backgroundColor = self.dominantClickedIntegersBusBeganImageView ? UIColor.clearColor : UIColor.whiteColor;
    _grayUnorderedNodeJobFinalizeView.layer.cornerRadius = RuleListCut.coloredDraft.malteseClamp;
    _grayUnorderedNodeJobFinalizeView.layer.masksToBounds = YES;
    [self.view addSubview:_grayUnorderedNodeJobFinalizeView];
    [self.view sendSubviewToBack:_grayUnorderedNodeJobFinalizeView];
    
    if (self.dominantClickedIntegersBusBeganImageView) {
        [self.view sendSubviewToBack:self.dominantClickedIntegersBusBeganImageView];
    }
    [_grayUnorderedNodeJobFinalizeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view);
        make.centerX.equalTo(self.view);
        make.size.mas_equalTo([RuleListCut insertedPickEnumerateDownloadBusHandshakeSize]);
    }];
    
    if (self.dominantClickedIntegersBusBeganImageView) {
        [self.dominantClickedIntegersBusBeganImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.grayUnorderedNodeJobFinalizeView);
        }];
    }
    
    
    UIView *civilFootView = [RuleListCut civilFootView];
    [self.view addSubview:civilFootView];
    self.civilFootView = civilFootView;
    [civilFootView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(RuleListCut.coloredDraft.redPeriodIll);
        make.height.mas_equalTo(RuleListCut.coloredDraft.panelArrival);
        make.left.equalTo(self.markWristButton.mas_right);
        make.right.equalTo(self.cascadeNotButton.mas_left);
    }];
    
    
    _downNotifyView = [[UITableView alloc] initWithFrame:CGRectZero style:(UITableViewStylePlain)];
    
    _downNotifyView.backgroundColor = [UIColor whiteColor];
    _downNotifyView.layer.masksToBounds = YES;
    _downNotifyView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
    _downNotifyView.separatorColor = [UIColor systemGroupedBackgroundColor];
    _downNotifyView.layer.borderColor = [RuleListCut slopeLockColor].CGColor;
    _downNotifyView.layer.borderWidth = 0.6;
    _downNotifyView.layer.cornerRadius = RuleListCut.coloredDraft.malteseClamp;
    _downNotifyView.rowHeight = RuleListCut.coloredDraft.sayPrettyJob;
    _downNotifyView.delegate = self;
    _downNotifyView.dataSource = self;
    [_downNotifyView registerClass:[RomanianPullWhoHighlightKitCell class] forCellReuseIdentifier:NSStringFromClass(RomanianPullWhoHighlightKitCell.class)];
    [self.view addSubview:_downNotifyView];
    [self.downNotifyView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.civilFootView.mas_bottom).offset(RuleListCut.coloredDraft.redPeriodIll);
        make.left.equalTo(self.grayUnorderedNodeJobFinalizeView).offset(RuleListCut.coloredDraft.herLimitSafe);
        make.right.equalTo(self.grayUnorderedNodeJobFinalizeView).offset(-RuleListCut.coloredDraft.herLimitSafe);
        make.height.mas_equalTo(RuleListCut.coloredDraft.sayPrettyJob);
    }];
    
    
    self.justBadYouButton = [RuleListCut returnSupportsLettishFormatsWrap:RuleListCut.costSonKnowKit.emptyDerivedSexualRestoringFace];
    [self.justBadYouButton addTarget:self action:@selector(abortedInfoMeasureConcertExtraDiphthongAction:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.grayUnorderedNodeJobFinalizeView addSubview:self.justBadYouButton];
    [self.justBadYouButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.grayUnorderedNodeJobFinalizeView).offset(-RuleListCut.coloredDraft.redPeriodIll);
        make.centerX.equalTo(self.view);
    }];
    
    
    self.denyTeamAreButton = [RuleListCut nominallyObstacleUnchangedBlobHybridColor:RuleListCut.costSonKnowKit.digitArtKin];
    [self.denyTeamAreButton addTarget:self action:@selector(wetDecrementComposerKitAttitudeCatalyst:) forControlEvents:UIControlEventTouchUpInside];
    [self.grayUnorderedNodeJobFinalizeView addSubview:self.denyTeamAreButton];
    [self.denyTeamAreButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.justBadYouButton.mas_top).offset(-RuleListCut.coloredDraft.minderCapAir);
        make.left.right.equalTo(self.downNotifyView);
        make.height.mas_equalTo(RuleListCut.coloredDraft.rareErrorMan);
    }];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return _minimizeArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    RomanianPullWhoHighlightKitCell *fold = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(RomanianPullWhoHighlightKitCell.class) forIndexPath:indexPath];
    NSArray *hoursLog = _minimizeArray[indexPath.row];
    
    fold.baseTimeName.text = hoursLog[0];
    
    fold.lowerDutchView.image = [[UIImage infoBusFilterVariationTurnName:hoursLog[1]] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
    
    fold.didDownPullTime.text = [NSString stringWithFormat:@"%@ %@",RuleListCut.costSonKnowKit.reversesSortingKashmiriStreetVitaminTime,[self slovenianHomePasswordDecryptRepeatGetTime:[hoursLog[2] doubleValue]]];
    
    fold.accessoryType = self.selectorsMapBeginGroupAttribute ? UITableViewCellAccessoryNone :  UITableViewCellAccessoryDisclosureIndicator;
    
    return fold;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    _guideChainSort = _minimizeArray[indexPath.row];
    self.selectorsMapBeginGroupAttribute = !self.selectorsMapBeginGroupAttribute;
}


- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    return self.selectorsMapBeginGroupAttribute;
}

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
    return UITableViewCellEditingStyleDelete;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        
        id hoursLog = _minimizeArray[indexPath.row];
        
        [_minimizeArray removeObject:hoursLog];
        
        [_bondExchangesArray removeObject:hoursLog];
        
        if ([self.urgentRatings respondsToSelector:@selector(ownBuildProvisionOriginalVendorProgressName:completion:)]) {
            [self.urgentRatings ownBuildProvisionOriginalVendorProgressName:hoursLog[0] completion:^(id object) {
                
            }];
        }
        
        if(_bondExchangesArray.count > 0){
            
            _minimizeArray = _bondExchangesArray;
            _guideChainSort = _minimizeArray.firstObject;
            self.selectorsMapBeginGroupAttribute = YES;
            
        }
    }
}


- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {
    return @"Delete";
}

- (void)updatingMindfulDroppedEsperantoSlant:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super updatingMindfulDroppedEsperantoSlant:touches withEvent:event];
    self.selectorsMapBeginGroupAttribute = NO;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super touchesBegan:touches withEvent:event];
    self.selectorsMapBeginGroupAttribute = NO;
}


- (void)abortedInfoMeasureConcertExtraDiphthongAction:(UIButton *)sender {
    ActionOffViewController *downhillBuild = [ActionOffViewController new];
    downhillBuild.urgentRatings = self.urgentRatings;
    [self.navigationController pushViewController:downhillBuild animated:NO];
}

- (void)wetDecrementComposerKitAttitudeCatalyst:(UIButton *)sender {
    if ([self.urgentRatings respondsToSelector:@selector(thumbDownloadsContactExclusiveIdentitySuddenSecondsName:completion:)]) {
        [IllegalRedView limitHandoverWindow];
        [self.urgentRatings thumbDownloadsContactExclusiveIdentitySuddenSecondsName:self.guideChainSort[0] completion:^(id object) {
            [IllegalRedView ourSavePartialRestartMatrixWindow];
        }];
    }
}


- (NSString *)slovenianHomePasswordDecryptRepeatGetTime:(double)beTime {
    
    NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
    double binQueueTime = now - beTime;
    NSString * publishPage;
    
    NSDate * addDate = [NSDate dateWithTimeIntervalSince1970:beTime];
    NSDateFormatter * out = [[NSDateFormatter alloc] init];
    [out setDateFormat:@"HH:mm"];
    NSString * pinkArt = [out stringFromDate:addDate];
    
    [out setDateFormat:@"dd"];
    NSString * redHer = [out stringFromDate:[NSDate date]];
    NSString * margins = [out stringFromDate:addDate];
    
    if (binQueueTime < 60) {
        publishPage = RuleListCut.costSonKnowKit.textSlashOdd;
    }else if (binQueueTime < 60 * 60) {
        publishPage = [NSString stringWithFormat:@"%ld%@",(long)binQueueTime / 60, RuleListCut.costSonKnowKit.bedEventInstantAppendSentence];
    }else if(binQueueTime < 24 * 60 * 60 && [redHer integerValue] == [margins integerValue]){
        publishPage = [NSString stringWithFormat:@"%@ %@",RuleListCut.costSonKnowKit.helloClaim,pinkArt];
    }else if(binQueueTime < 24 * 60 * 60 * 2 && [redHer integerValue] != [margins integerValue]){
        if ([redHer integerValue] - [margins integerValue] == 1 || ([margins integerValue] - [redHer integerValue] > 10 && [redHer integerValue] == 1)) {
            publishPage = [NSString stringWithFormat:@"%@ %@",RuleListCut.costSonKnowKit.drawMeanIndoor,pinkArt];
        }else{
            [out setDateFormat:@"MM-dd HH:mm"];
            publishPage = [out stringFromDate:addDate];
        }
    }else if(binQueueTime < 24 * 60 * 60 * 365){
        [out setDateFormat:@"MM-dd HH:mm"];
        publishPage = [out stringFromDate:addDate];
    }else{
        [out setDateFormat:@"yyyy-MM-dd HH:mm"];
        publishPage = [out stringFromDate:addDate];
    }
    return publishPage;
}

@end
