






#import "FollowEntryButton.h"
#import "FixMaterial.h"
#import "UIImage+TryImage.h"

@interface FollowEntryButton ()


@property (nonatomic, strong) NSTimer *undoHardEnsureTimer;

@property (nonatomic, assign) NSInteger rotorRoutePutYoungerPersonalDeciliter;

@property (nonatomic, copy) NSString *forAngularRankMouthShipment;

@end

@implementation FollowEntryButton

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

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


- (void)wristTempThermalPrecisionNotify {
    
    self.reflectLighterMountedAirIntensityPreferred = 60;
    self.forAngularRankMouthShipment = FixMaterial.dryMicroCapTag.receiptFatRelevanceRestoringDefinesPopCode;
    [self setTitle:self.forAngularRankMouthShipment forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage narrativeLinerColor:FixMaterial.beforeArtColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage narrativeLinerColor:[[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(directlyRetClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)directlyRetClicked {
    [self installsAddAcceptSpokenBeacon];
    if (self.sawPoloAreArtAction) {
        self.sawPoloAreArtAction();
    }
}


- (void)installsAddAcceptSpokenBeacon {
    self.enabled = NO;
    self.rotorRoutePutYoungerPersonalDeciliter = self.reflectLighterMountedAirIntensityPreferred;
    [self higherSafeGenderPreparedRowHourly];
    
    
    self.undoHardEnsureTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(videoIntroWonEditorLiner:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)videoIntroWonEditorLiner:(NSTimer *)today {
    self.rotorRoutePutYoungerPersonalDeciliter--;
    if (self.rotorRoutePutYoungerPersonalDeciliter <= 0) {
        [self coloredMouseAchievedClickedButterfly];
    } else {
        [self higherSafeGenderPreparedRowHourly];
    }
}


- (void)higherSafeGenderPreparedRowHourly {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",FixMaterial.dryMicroCapTag.bigRotationSlashesSignerIcyGaelicCode, (long)self.rotorRoutePutYoungerPersonalDeciliter];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)coloredMouseAchievedClickedButterfly {
    [self.undoHardEnsureTimer invalidate];
    self.undoHardEnsureTimer = nil;
    self.enabled = YES;
    [self setTitle:self.forAngularRankMouthShipment forState:UIControlStateNormal];
}

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

@end
