






#import "OneElderWayButton.h"
#import "FixChunkBad.h"
#import "UIImage+MenImage.h"

@interface OneElderWayButton ()


@property (nonatomic, strong) NSTimer *nameStepArteryTimer;

@property (nonatomic, assign) NSInteger homeUnifyAccessoryPublishPrecisionStreams;

@property (nonatomic, copy) NSString *ukrainianCallbackTheUnsavedSnap;

@end

@implementation OneElderWayButton

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

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


- (void)resultingDecimalMiddleKilogramsReset {
    
    self.ouncesFileEndpointIdenticalSuspendedSerial = 60;
    self.ukrainianCallbackTheUnsavedSnap = FixChunkBad.passLazyUnique.processesModifiersMillCustomPanoramasRemovalCode;
    [self setTitle:self.ukrainianCallbackTheUnsavedSnap forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage heartbeatSplitColor:FixChunkBad.topOpaqueColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage heartbeatSplitColor:[[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(softnessSunClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)softnessSunClicked {
    [self slashFeedBackNewtonsPermute];
    if (self.retTornadoTooAction) {
        self.retTornadoTooAction();
    }
}


- (void)slashFeedBackNewtonsPermute {
    self.enabled = NO;
    self.homeUnifyAccessoryPublishPrecisionStreams = self.ouncesFileEndpointIdenticalSuspendedSerial;
    [self behaveDefineFormatsReachableIslamicDigital];
    
    
    self.nameStepArteryTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(sheDiagnoseCommandSplitAllocated:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)sheDiagnoseCommandSplitAllocated:(NSTimer *)segue {
    self.homeUnifyAccessoryPublishPrecisionStreams--;
    if (self.homeUnifyAccessoryPublishPrecisionStreams <= 0) {
        [self messageIndentCalculateGravityControl];
    } else {
        [self behaveDefineFormatsReachableIslamicDigital];
    }
}


- (void)behaveDefineFormatsReachableIslamicDigital {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",FixChunkBad.passLazyUnique.areRunManSelectAgentBadCode, (long)self.homeUnifyAccessoryPublishPrecisionStreams];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)messageIndentCalculateGravityControl {
    [self.nameStepArteryTimer invalidate];
    self.nameStepArteryTimer = nil;
    self.enabled = YES;
    [self setTitle:self.ukrainianCallbackTheUnsavedSnap forState:UIControlStateNormal];
}

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

@end
