






#import "TabForFrameButton.h"
#import "SumWorkTrad.h"
#import "UIImage+LawImage.h"

@interface TabForFrameButton ()


@property (nonatomic, strong) NSTimer *scanBarBondWasTimer;

@property (nonatomic, assign) NSInteger adverbOptionPopoverInstancesHungarianDiscard;

@property (nonatomic, copy) NSString *artEasyWideOddCurve;

@end

@implementation TabForFrameButton

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

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


- (void)circleOverageRoundNoticeFemale {
    
    self.physicalDividingSentencesAirPrototypeDuration = 60;
    self.artEasyWideOddCurve = SumWorkTrad.arrayLawAllTop.uniformCameraTodayTagsBackTatarCode;
    [self setTitle:self.artEasyWideOddCurve forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage popRaceSaltGetColor:SumWorkTrad.alphaPingColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage popRaceSaltGetColor:[[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(finalAcrossClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)finalAcrossClicked {
    [self reverseValidatesRevisionLingerAbout];
    if (self.lazyKinBarAgeAction) {
        self.lazyKinBarAgeAction();
    }
}


- (void)reverseValidatesRevisionLingerAbout {
    self.enabled = NO;
    self.adverbOptionPopoverInstancesHungarianDiscard = self.physicalDividingSentencesAirPrototypeDuration;
    [self animatedPreviousFalloffFractionManSurrogate];
    
    
    self.scanBarBondWasTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(hertzAdvisedOwnRedirectsPersonal:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)hertzAdvisedOwnRedirectsPersonal:(NSTimer *)great {
    self.adverbOptionPopoverInstancesHungarianDiscard--;
    if (self.adverbOptionPopoverInstancesHungarianDiscard <= 0) {
        [self goalGrandauntArtTelephotoKirghiz];
    } else {
        [self animatedPreviousFalloffFractionManSurrogate];
    }
}


- (void)animatedPreviousFalloffFractionManSurrogate {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",SumWorkTrad.arrayLawAllTop.greenParagraphFrequencyModelEmbeddingThickCode, (long)self.adverbOptionPopoverInstancesHungarianDiscard];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)goalGrandauntArtTelephotoKirghiz {
    [self.scanBarBondWasTimer invalidate];
    self.scanBarBondWasTimer = nil;
    self.enabled = YES;
    [self setTitle:self.artEasyWideOddCurve forState:UIControlStateNormal];
}

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

@end
