






#import "FinalizeOutButton.h"
#import "BinTopLemma.h"
#import "UIImage+OptImage.h"

@interface FinalizeOutButton ()


@property (nonatomic, strong) NSTimer *signalingIntroTimer;

@property (nonatomic, assign) NSInteger condensedLigaturesPaperKilobytesFootTrait;

@property (nonatomic, copy) NSString *networkPingHangUplinkRefreshed;

@end

@implementation FinalizeOutButton

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self readableBlackSafeLightSchool];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)coder {
    self = [super initWithCoder:coder];
    if (self) {
        [self readableBlackSafeLightSchool];
    }
    return self;
}


- (void)readableBlackSafeLightSchool {
    
    self.sodiumRecorderDescendedDescentPreferFractions = 60;
    self.networkPingHangUplinkRefreshed = BinTopLemma.oldHitDownIron.suchGainAdjectiveKitPublishLocationsCode;
    [self setTitle:self.networkPingHangUplinkRefreshed forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage minBarTwoIdiomColor:BinTopLemma.tabCookieColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage minBarTwoIdiomColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.layer.cornerRadius = 2.f;
    self.layer.masksToBounds = YES;
    
    self.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5);
    
    [self sizeToFit];
    
    
    [self addTarget:self action:@selector(shotPointerClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)shotPointerClicked {
    [self streetEightSubgroupGigabytesRope];
    if (self.pairNominallyAction) {
        self.pairNominallyAction();
    }
}


- (void)streetEightSubgroupGigabytesRope {
    self.enabled = NO;
    self.condensedLigaturesPaperKilobytesFootTrait = self.sodiumRecorderDescendedDescentPreferFractions;
    [self tryHundredsAssumeIndentNormalizeScrolling];
    
    
    self.signalingIntroTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(disposeParagraphInsulinRealmRetry:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)disposeParagraphInsulinRealmRetry:(NSTimer *)drive {
    self.condensedLigaturesPaperKilobytesFootTrait--;
    if (self.condensedLigaturesPaperKilobytesFootTrait <= 0) {
        [self allPublicSeeMinorHead];
    } else {
        [self tryHundredsAssumeIndentNormalizeScrolling];
    }
}


- (void)tryHundredsAssumeIndentNormalizeScrolling {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",BinTopLemma.oldHitDownIron.domainsBlueHeaderSortCharacterSentCode, (long)self.condensedLigaturesPaperKilobytesFootTrait];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)allPublicSeeMinorHead {
    [self.signalingIntroTimer invalidate];
    self.signalingIntroTimer = nil;
    self.enabled = YES;
    [self setTitle:self.networkPingHangUplinkRefreshed forState:UIControlStateNormal];
}

- (void)dealloc {
    
    [self.signalingIntroTimer invalidate];
    self.signalingIntroTimer = nil;
}

@end
