






#import "RightCarSunButton.h"
#import "PaceDownHue.h"
#import "UIImage+KeyImage.h"

@interface RightCarSunButton ()


@property (nonatomic, strong) NSTimer *dropMillOwnJobTimer;

@property (nonatomic, assign) NSInteger quotationLatitudePushPrecisionLevelLock;

@property (nonatomic, copy) NSString *completedOverrideLawCoverChromatic;

@end

@implementation RightCarSunButton

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

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


- (void)crossOutlineProxyEscapingMutable {
    
    self.rowFixingKilobitsParticleEraserBasal = 60;
    self.completedOverrideLawCoverChromatic = PaceDownHue.touchBusyMalay.diagnoseHumidityMonthEngineerMinResourcesCode;
    [self setTitle:self.completedOverrideLawCoverChromatic forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage browseMuteMillColor:PaceDownHue.frequencyColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage browseMuteMillColor:[[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(closeIcyMayClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)closeIcyMayClicked {
    [self primeTooPongStaticCharacter];
    if (self.planHintRetryAction) {
        self.planHintRetryAction();
    }
}


- (void)primeTooPongStaticCharacter {
    self.enabled = NO;
    self.quotationLatitudePushPrecisionLevelLock = self.rowFixingKilobitsParticleEraserBasal;
    [self artHumidityExtrinsicRecycleSuchPrior];
    
    
    self.dropMillOwnJobTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(tapDetachSockMathFocusing:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)tapDetachSockMathFocusing:(NSTimer *)spine {
    self.quotationLatitudePushPrecisionLevelLock--;
    if (self.quotationLatitudePushPrecisionLevelLock <= 0) {
        [self scheduledBoundingMetabolicBarBag];
    } else {
        [self artHumidityExtrinsicRecycleSuchPrior];
    }
}


- (void)artHumidityExtrinsicRecycleSuchPrior {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",PaceDownHue.touchBusyMalay.alternateDerivedFractionsTouchReadySeeCode, (long)self.quotationLatitudePushPrecisionLevelLock];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)scheduledBoundingMetabolicBarBag {
    [self.dropMillOwnJobTimer invalidate];
    self.dropMillOwnJobTimer = nil;
    self.enabled = YES;
    [self setTitle:self.completedOverrideLawCoverChromatic forState:UIControlStateNormal];
}

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

@end
