






#import "OutlinePipeButton.h"
#import "ClaimMaxBig.h"
#import "UIImage+BagImage.h"

@interface OutlinePipeButton ()


@property (nonatomic, strong) NSTimer *fullIronReduceTimer;

@property (nonatomic, assign) NSInteger sedentaryDrivenMaxCountedAscendingFeature;

@property (nonatomic, copy) NSString *theBarAtomScaleEldest;

@end

@implementation OutlinePipeButton

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

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


- (void)commitAscenderLocationPressMastering {
    
    self.magnesiumMediumPenVowelQuantityPlay = 60;
    self.theBarAtomScaleEldest = ClaimMaxBig.allFeedEarGolf.promotionOutFocusesActiveClearedPathCode;
    [self setTitle:self.theBarAtomScaleEldest forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage capturedReviewColor:ClaimMaxBig.nineSlideColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage capturedReviewColor:[[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(inhalerSlabClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)inhalerSlabClicked {
    [self didWindowUnsafeCurrencyGaelic];
    if (self.blockerEffortAction) {
        self.blockerEffortAction();
    }
}


- (void)didWindowUnsafeCurrencyGaelic {
    self.enabled = NO;
    self.sedentaryDrivenMaxCountedAscendingFeature = self.magnesiumMediumPenVowelQuantityPlay;
    [self ductilityPrematureExclusiveServerInviteUrgency];
    
    
    self.fullIronReduceTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(pinGroupAgreementSpeedKin:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)pinGroupAgreementSpeedKin:(NSTimer *)sleet {
    self.sedentaryDrivenMaxCountedAscendingFeature--;
    if (self.sedentaryDrivenMaxCountedAscendingFeature <= 0) {
        [self clustersReceivedDrainShelfIdentical];
    } else {
        [self ductilityPrematureExclusiveServerInviteUrgency];
    }
}


- (void)ductilityPrematureExclusiveServerInviteUrgency {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",ClaimMaxBig.allFeedEarGolf.localizesMarginsRomanianMostEstimatedYouCode, (long)self.sedentaryDrivenMaxCountedAscendingFeature];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)clustersReceivedDrainShelfIdentical {
    [self.fullIronReduceTimer invalidate];
    self.fullIronReduceTimer = nil;
    self.enabled = YES;
    [self setTitle:self.theBarAtomScaleEldest forState:UIControlStateNormal];
}

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

@end
