






#import "CompressPubButton.h"
#import "ForHueAfter.h"
#import "UIImage+GetImage.h"

@interface CompressPubButton ()


@property (nonatomic, strong) NSTimer *depthHexArtPenTimer;

@property (nonatomic, assign) NSInteger responsesEraKindCopperDraftAccount;

@property (nonatomic, copy) NSString *degreeWetParentalStateRace;

@end

@implementation CompressPubButton

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

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


- (void)availableOnceRetryMoireWet {
    
    self.topIcyBehaviorsLoseRespectsDrag = 60;
    self.degreeWetParentalStateRace = ForHueAfter.stayFourthHint.semanticsNearestSubgroupsNoiseMinimizeAttachCode;
    [self setTitle:self.degreeWetParentalStateRace forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage readerCoalesceColor:ForHueAfter.requiringColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage readerCoalesceColor:[[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(passGrowJobClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)passGrowJobClicked {
    [self tenExemplarMutableLogRearrange];
    if (self.densityMotionAction) {
        self.densityMotionAction();
    }
}


- (void)tenExemplarMutableLogRearrange {
    self.enabled = NO;
    self.responsesEraKindCopperDraftAccount = self.topIcyBehaviorsLoseRespectsDrag;
    [self sonSquaresYearImageOperatingMoire];
    
    
    self.depthHexArtPenTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(contrastInferiorsRenderGermanCorner:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)contrastInferiorsRenderGermanCorner:(NSTimer *)welsh {
    self.responsesEraKindCopperDraftAccount--;
    if (self.responsesEraKindCopperDraftAccount <= 0) {
        [self safetySpaLemmaSolutionsNet];
    } else {
        [self sonSquaresYearImageOperatingMoire];
    }
}


- (void)sonSquaresYearImageOperatingMoire {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",ForHueAfter.stayFourthHint.preparingTransmitConfigureSawLogoUnwindCode, (long)self.responsesEraKindCopperDraftAccount];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)safetySpaLemmaSolutionsNet {
    [self.depthHexArtPenTimer invalidate];
    self.depthHexArtPenTimer = nil;
    self.enabled = YES;
    [self setTitle:self.degreeWetParentalStateRace forState:UIControlStateNormal];
}

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

@end
