






#import "SerifMinSheButton.h"
#import "FrictionShe.h"
#import "UIImage+RawImage.h"

@interface SerifMinSheButton ()


@property (nonatomic, strong) NSTimer *decayBasicTalkTimer;

@property (nonatomic, assign) NSInteger versionsSplatSupportPinkCornerLoose;

@property (nonatomic, copy) NSString *replaceErrorAbortedStrokingNote;

@end

@implementation SerifMinSheButton

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

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


- (void)tooBalanceFragmentRollChoose {
    
    self.danishArrayEarlyStoragePopSuccess = 60;
    self.replaceErrorAbortedStrokingNote = FrictionShe.saltBurstFinal.settlingTransposeInactiveClampSubscriptDeciliterCode;
    [self setTitle:self.replaceErrorAbortedStrokingNote forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage allSumGrowMildColor:FrictionShe.collectorColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage allSumGrowMildColor:[[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(rollItsPintClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)rollItsPintClicked {
    [self controlRepliesCovariantCutSuggested];
    if (self.offLeftZipDidAction) {
        self.offLeftZipDidAction();
    }
}


- (void)controlRepliesCovariantCutSuggested {
    self.enabled = NO;
    self.versionsSplatSupportPinkCornerLoose = self.danishArrayEarlyStoragePopSuccess;
    [self modelShowCatCertBelowExtra];
    
    
    self.decayBasicTalkTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(withArePopProviderBegan:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)withArePopProviderBegan:(NSTimer *)proxy {
    self.versionsSplatSupportPinkCornerLoose--;
    if (self.versionsSplatSupportPinkCornerLoose <= 0) {
        [self somaliJobPartialMissingPreset];
    } else {
        [self modelShowCatCertBelowExtra];
    }
}


- (void)modelShowCatCertBelowExtra {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",FrictionShe.saltBurstFinal.wakeLeftDitherAddCautionOvulationCode, (long)self.versionsSplatSupportPinkCornerLoose];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)somaliJobPartialMissingPreset {
    [self.decayBasicTalkTimer invalidate];
    self.decayBasicTalkTimer = nil;
    self.enabled = YES;
    [self setTitle:self.replaceErrorAbortedStrokingNote forState:UIControlStateNormal];
}

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

@end
