






#import "CarHintToolButton.h"
#import "MainMinimal.h"
#import "UIImage+OptImage.h"

@interface CarHintToolButton ()


@property (nonatomic, strong) NSTimer *glyphEnterSinkTimer;

@property (nonatomic, assign) NSInteger forwardsVitaminEyeYardUnderlinePlayable;

@property (nonatomic, copy) NSString *funAudioChapterPriorityJabber;

@end

@implementation CarHintToolButton

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

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


- (void)outBankBulgarianFaxUnlikely {
    
    self.inheritedBoldSalientDiskGrammarSong = 60;
    self.funAudioChapterPriorityJabber = MainMinimal.tiedTagCertTen.joinPartiallyRaceAdjustSubgroupsSoftCode;
    [self setTitle:self.funAudioChapterPriorityJabber forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage blackAnonymousColor:MainMinimal.anyUpsideColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage blackAnonymousColor:[[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(eastStepsonClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)eastStepsonClicked {
    [self mostEffectiveClimbedDeltaSelection];
    if (self.ownSugarAvailAction) {
        self.ownSugarAvailAction();
    }
}


- (void)mostEffectiveClimbedDeltaSelection {
    self.enabled = NO;
    self.forwardsVitaminEyeYardUnderlinePlayable = self.inheritedBoldSalientDiskGrammarSong;
    [self suchMotionAssistiveMenstrualSocialGoal];
    
    
    self.glyphEnterSinkTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(outletMillionFastestIntentsPlain:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)outletMillionFastestIntentsPlain:(NSTimer *)pulse {
    self.forwardsVitaminEyeYardUnderlinePlayable--;
    if (self.forwardsVitaminEyeYardUnderlinePlayable <= 0) {
        [self nearAscenderEarProvidesChecksum];
    } else {
        [self suchMotionAssistiveMenstrualSocialGoal];
    }
}


- (void)suchMotionAssistiveMenstrualSocialGoal {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",MainMinimal.tiedTagCertTen.variableFusionUnorderedCleanSundanesePurposeCode, (long)self.forwardsVitaminEyeYardUnderlinePlayable];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)nearAscenderEarProvidesChecksum {
    [self.glyphEnterSinkTimer invalidate];
    self.glyphEnterSinkTimer = nil;
    self.enabled = YES;
    [self setTitle:self.funAudioChapterPriorityJabber forState:UIControlStateNormal];
}

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

@end
