






#import "MinimalTeamButton.h"
#import "AlbumBoxSex.h"
#import "UIImage+DayImage.h"

@interface MinimalTeamButton ()


@property (nonatomic, strong) NSTimer *majorMusicPeerTimer;

@property (nonatomic, assign) NSInteger signalingAbsentExtentsTatarCloudIcelandic;

@property (nonatomic, copy) NSString *hindiWorkingSixReversedUnlikely;

@end

@implementation MinimalTeamButton

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

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


- (void)systolicOneTruncateCookieCriteria {
    
    self.ornamentTheFastestPermittedNumericOriginal = 60;
    self.hindiWorkingSixReversedUnlikely = AlbumBoxSex.topWaxTreeRole.yesterdayElevatedEnterRowSpaceReorderCode;
    [self setTitle:self.hindiWorkingSixReversedUnlikely forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage momentaryTwistColor:AlbumBoxSex.panIodineColor] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage momentaryTwistColor:[[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(designFirstClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)designFirstClicked {
    [self appleUsageRealmColumnUppercase];
    if (self.producedEventAction) {
        self.producedEventAction();
    }
}


- (void)appleUsageRealmColumnUppercase {
    self.enabled = NO;
    self.signalingAbsentExtentsTatarCloudIcelandic = self.ornamentTheFastestPermittedNumericOriginal;
    [self fixingExistEraCatalystExpansionUnlock];
    
    
    self.majorMusicPeerTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(archerySentinelPortraitsRearPort:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)archerySentinelPortraitsRearPort:(NSTimer *)awake {
    self.signalingAbsentExtentsTatarCloudIcelandic--;
    if (self.signalingAbsentExtentsTatarCloudIcelandic <= 0) {
        [self hardSubfamilyFactorUniqueEvaluated];
    } else {
        [self fixingExistEraCatalystExpansionUnlock];
    }
}


- (void)fixingExistEraCatalystExpansionUnlock {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",AlbumBoxSex.topWaxTreeRole.managersFoundRainTelephoneAboveRadiansCode, (long)self.signalingAbsentExtentsTatarCloudIcelandic];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)hardSubfamilyFactorUniqueEvaluated {
    [self.majorMusicPeerTimer invalidate];
    self.majorMusicPeerTimer = nil;
    self.enabled = YES;
    [self setTitle:self.hindiWorkingSixReversedUnlikely forState:UIControlStateNormal];
}

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

@end
