






#import "ContextDeepButton.h"
#import "LeftHosting.h"
#import "UIImage+SonImage.h"

@interface ContextDeepButton ()


@property (nonatomic, strong) NSTimer *longerOverLongTimer;

@property (nonatomic, assign) NSInteger localResolvingHitFollowerShareParsecs;

@property (nonatomic, copy) NSString *allocateAirActualJabberWas;

@end

@implementation ContextDeepButton

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

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


- (void)cocoaRopeArbitrarySobYou {
    
    self.bringLeftMetricSerializeColumnCoached = 60;
    self.allocateAirActualJabberWas = LeftHosting.carMapKeepPick.companySlideManagedChinaCutAppearCode;
    [self setTitle:self.allocateAirActualJabberWas forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage claimReplyClipColor:LeftHosting.rankCycleColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage claimReplyClipColor:[[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(respondsBigClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)respondsBigClicked {
    [self winComposeLikeScrolledSingle];
    if (self.hueOldIllWalkAction) {
        self.hueOldIllWalkAction();
    }
}


- (void)winComposeLikeScrolledSingle {
    self.enabled = NO;
    self.localResolvingHitFollowerShareParsecs = self.bringLeftMetricSerializeColumnCoached;
    [self fractionButtonsRationalWireCharacterHello];
    
    
    self.longerOverLongTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(scriptsMountedCancelledTerminalPin:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)scriptsMountedCancelledTerminalPin:(NSTimer *)prior {
    self.localResolvingHitFollowerShareParsecs--;
    if (self.localResolvingHitFollowerShareParsecs <= 0) {
        [self focalSilencedPaddleReasonTab];
    } else {
        [self fractionButtonsRationalWireCharacterHello];
    }
}


- (void)fractionButtonsRationalWireCharacterHello {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",LeftHosting.carMapKeepPick.builderRareEventHisRetryTrustCode, (long)self.localResolvingHitFollowerShareParsecs];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)focalSilencedPaddleReasonTab {
    [self.longerOverLongTimer invalidate];
    self.longerOverLongTimer = nil;
    self.enabled = YES;
    [self setTitle:self.allocateAirActualJabberWas forState:UIControlStateNormal];
}

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

@end
