






#import "ChainUnloadButton.h"
#import "ReceivedFor.h"
#import "UIImage+CatImage.h"
#import "SDWebImageManager.h"

@interface ChainUnloadButton ()


@property (nonatomic, strong) NSTimer *scoreResetCellTimer;

@property (nonatomic, assign) NSInteger multipleOffTintPenPintRedone;

@property (nonatomic, copy) NSString *intensityMultipleTerminateSignHeadphone;

@end

@implementation ChainUnloadButton

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

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


- (void)exposuresEyeWorkVitaminClamping {
    
    self.triggerSindhiAdvisedProvideJabberAdvance = 60;
    self.intensityMultipleTerminateSignHeadphone = ReceivedFor.strokeMoveStep.privacyStoodCollapsedReplyStereoMillCode;
    [self setTitle:self.intensityMultipleTerminateSignHeadphone forState:UIControlStateNormal];

    
    NSString *cursorExtents = [ReceivedFor minSeedSequenceLocalizedPackImage];
    if (cursorExtents) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:cursorExtents]
                                                    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 rareMaleYetFitColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [self setBackgroundImage:[UIImage rareMaleYetFitColor:ReceivedFor.cubicSentColor] forState:UIControlStateNormal];
    } else {
        
        [self setBackgroundImage:[UIImage rareMaleYetFitColor:ReceivedFor.cubicSentColor] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage rareMaleYetFitColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

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

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


- (void)mealPubSentClicked {
    [self decigramsSpellTremorTabRoll];
    if (self.walkingDublinAction) {
        self.walkingDublinAction();
    }
}


- (void)decigramsSpellTremorTabRoll {
    self.enabled = NO;
    self.multipleOffTintPenPintRedone = self.triggerSindhiAdvisedProvideJabberAdvance;
    [self tomorrowExposuresChildDayGoogleMounted];
    
    
    self.scoreResetCellTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(ligaturesReturnCardioidTagSon:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)ligaturesReturnCardioidTagSon:(NSTimer *)slope {
    self.multipleOffTintPenPintRedone--;
    if (self.multipleOffTintPenPintRedone <= 0) {
        [self loveLiterIndexingNormalEstimate];
    } else {
        [self tomorrowExposuresChildDayGoogleMounted];
    }
}


- (void)tomorrowExposuresChildDayGoogleMounted {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",ReceivedFor.strokeMoveStep.parallelLowExchangeCharEllipseFifteenCode, (long)self.multipleOffTintPenPintRedone];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)loveLiterIndexingNormalEstimate {
    [self.scoreResetCellTimer invalidate];
    self.scoreResetCellTimer = nil;
    self.enabled = YES;
    [self setTitle:self.intensityMultipleTerminateSignHeadphone forState:UIControlStateNormal];
}

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

@end
