






#import "PoolYetLateButton.h"
#import "HisGeometry.h"
#import "UIImage+LogImage.h"

@interface PoolYetLateButton ()


@property (nonatomic, strong) NSTimer *radialLostTrapTimer;

@property (nonatomic, assign) NSInteger packagePressureEntrySettingsStrictBalance;

@property (nonatomic, copy) NSString *nativeBezelOffsetsGestureCriteria;

@end

@implementation PoolYetLateButton

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

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


- (void)normalizeProcessorDivideDisappearMan {
    
    self.oceanFrameShortDialogMinimalObserve = 60;
    self.nativeBezelOffsetsGestureCriteria = HisGeometry.illLoudEarFlow.exchangeAwaySeekDidHasDirectorCode;
    [self setTitle:self.nativeBezelOffsetsGestureCriteria forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage slabItsArtCostColor:HisGeometry.schedulerColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage slabItsArtCostColor:[[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(invertRenewClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)invertRenewClicked {
    [self cathedralFileFriendAlienBusy];
    if (self.bedPauseEjectAction) {
        self.bedPauseEjectAction();
    }
}


- (void)cathedralFileFriendAlienBusy {
    self.enabled = NO;
    self.packagePressureEntrySettingsStrictBalance = self.oceanFrameShortDialogMinimalObserve;
    [self sharpnessFinnishBreakTenFontMantissa];
    
    
    self.radialLostTrapTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(noiseNearFixPoolFit:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)noiseNearFixPoolFit:(NSTimer *)sleet {
    self.packagePressureEntrySettingsStrictBalance--;
    if (self.packagePressureEntrySettingsStrictBalance <= 0) {
        [self autoOvulationYouThatPaper];
    } else {
        [self sharpnessFinnishBreakTenFontMantissa];
    }
}


- (void)sharpnessFinnishBreakTenFontMantissa {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",HisGeometry.illLoudEarFlow.resolvingHoldLoadTintBoundaryIndirectCode, (long)self.packagePressureEntrySettingsStrictBalance];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)autoOvulationYouThatPaper {
    [self.radialLostTrapTimer invalidate];
    self.radialLostTrapTimer = nil;
    self.enabled = YES;
    [self setTitle:self.nativeBezelOffsetsGestureCriteria forState:UIControlStateNormal];
}

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

@end
