






#import "YetFunLiterButton.h"
#import "AffectedBus.h"
#import "UIImage+LawImage.h"

@interface YetFunLiterButton ()


@property (nonatomic, strong) NSTimer *winUseStillNapTimer;

@property (nonatomic, assign) NSInteger addItalicsReverseScanningSpeedOutcome;

@property (nonatomic, copy) NSString *datumBoxDistanceCustomFor;

@end

@implementation YetFunLiterButton

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

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


- (void)networkLayoutBoxSelectionInterrupt {
    
    self.weeklyDanishPointersLaotianSawSun = 60;
    self.datumBoxDistanceCustomFor = AffectedBus.delayOceanMale.scaleProviderOwnerBeaconsUserAndCode;
    [self setTitle:self.datumBoxDistanceCustomFor forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage multiplyPersonColor:AffectedBus.betterWhoColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage multiplyPersonColor:[[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(pubMajorOddClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)pubMajorOddClicked {
    [self forDragDistinctGivenMinor];
    if (self.decimalRenderAction) {
        self.decimalRenderAction();
    }
}


- (void)forDragDistinctGivenMinor {
    self.enabled = NO;
    self.addItalicsReverseScanningSpeedOutcome = self.weeklyDanishPointersLaotianSawSun;
    [self menuVerboseSlopeConflictPolishDigitized];
    
    
    self.winUseStillNapTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(spousesIrishDefaultsShortcutsMin:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)spousesIrishDefaultsShortcutsMin:(NSTimer *)smart {
    self.addItalicsReverseScanningSpeedOutcome--;
    if (self.addItalicsReverseScanningSpeedOutcome <= 0) {
        [self oddPolishThroughMagneticCert];
    } else {
        [self menuVerboseSlopeConflictPolishDigitized];
    }
}


- (void)menuVerboseSlopeConflictPolishDigitized {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",AffectedBus.delayOceanMale.forbidManColorReminderControlPlayCode, (long)self.addItalicsReverseScanningSpeedOutcome];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)oddPolishThroughMagneticCert {
    [self.winUseStillNapTimer invalidate];
    self.winUseStillNapTimer = nil;
    self.enabled = YES;
    [self setTitle:self.datumBoxDistanceCustomFor forState:UIControlStateNormal];
}

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

@end
