






#import "DelayedHoldButton.h"
#import "ReadWaxDash.h"
#import "UIImage+SeeImage.h"
#import "SDWebImageManager.h"

@interface DelayedHoldButton ()


@property (nonatomic, strong) NSTimer *caloriesNotifyTimer;

@property (nonatomic, assign) NSInteger highestTorqueKirghizSlavicUsesAnchored;

@property (nonatomic, copy) NSString *sexualRelativeGatewaysWristFlight;

@end

@implementation DelayedHoldButton

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

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


- (void)subLighterAlpineNiacinSensor {
    
    self.backupTakeSubWasAirlineSum = 60;
    self.sexualRelativeGatewaysWristFlight = ReadWaxDash.spaLiveIronTry.cupLockBagIdiomTrialClampedCode;
    [self setTitle:self.sexualRelativeGatewaysWristFlight forState:UIControlStateNormal];

    
    NSString *sexCapThiamin = [ReadWaxDash betterCheckingInsidePrintGolfImage];
    if (sexCapThiamin) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:sexCapThiamin]
                                                    options:0
                                                   progress:nil
                                                  completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [self setBackgroundImage:image forState:UIControlStateNormal];
                    [self setBackgroundImage:[UIImage rowBoxAnyYahooColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [self setBackgroundImage:[UIImage rowBoxAnyYahooColor:ReadWaxDash.trackForkColor] forState:UIControlStateNormal];
    } else {
        
        [self setBackgroundImage:[UIImage rowBoxAnyYahooColor:ReadWaxDash.trackForkColor] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage rowBoxAnyYahooColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.layer.cornerRadius = ReadWaxDash.strideFooter.mayFunctions;
    self.layer.masksToBounds = YES;
    
    self.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5);
    
    [self sizeToFit];

    
    [self addTarget:self action:@selector(pubRawPinchClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)pubRawPinchClicked {
    [self refreshedCommonDeciliterLeakyCancel];
    if (self.funLawBurmeseAction) {
        self.funLawBurmeseAction();
    }
}


- (void)refreshedCommonDeciliterLeakyCancel {
    self.enabled = NO;
    self.highestTorqueKirghizSlavicUsesAnchored = self.backupTakeSubWasAirlineSum;
    [self lowercaseCookiesFourthLayerInfinityEar];
    
    
    self.caloriesNotifyTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(bufferedInstallProviderSonFun:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)bufferedInstallProviderSonFun:(NSTimer *)unify {
    self.highestTorqueKirghizSlavicUsesAnchored--;
    if (self.highestTorqueKirghizSlavicUsesAnchored <= 0) {
        [self redoneHighlightDeepVariationCondition];
    } else {
        [self lowercaseCookiesFourthLayerInfinityEar];
    }
}


- (void)lowercaseCookiesFourthLayerInfinityEar {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",ReadWaxDash.spaLiveIronTry.panLicenseDuplicateOffsetProducerAmbienceCode, (long)self.highestTorqueKirghizSlavicUsesAnchored];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)redoneHighlightDeepVariationCondition {
    [self.caloriesNotifyTimer invalidate];
    self.caloriesNotifyTimer = nil;
    self.enabled = YES;
    [self setTitle:self.sexualRelativeGatewaysWristFlight forState:UIControlStateNormal];
}

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

@end
