






#import "SlashEntityButton.h"
#import "ApplyToggle.h"
#import "UIImage+MinImage.h"
#import "SDWebImageManager.h"

@interface SlashEntityButton ()


@property (nonatomic, strong) NSTimer *roleSumPutSinkTimer;

@property (nonatomic, assign) NSInteger obtainVisitorDegreesInviteeOldestVisible;

@property (nonatomic, copy) NSString *boundRollbackMissingBayerRectum;

@end

@implementation SlashEntityButton

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

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


- (void)playbackTelephotoAcuteSchemesAge {
    
    self.hisWarpLayerSentencesContentsCriteria = 60;
    self.boundRollbackMissingBayerRectum = ApplyToggle.subDayEventDay.bodyParameterIndentIntroBitsTraitCode;
    [self setTitle:self.boundRollbackMissingBayerRectum forState:UIControlStateNormal];

    
    NSString *finishedOrder = [ApplyToggle highestSubstringCalculateArteryPresentedImage];
    if (finishedOrder) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:finishedOrder]
                                                    options:0
                                                   progress:nil
                                                  completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [self setBackgroundImage:image forState:UIControlStateNormal];
                    [self setBackgroundImage:[UIImage flashSizeQueueColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [self setBackgroundImage:[UIImage flashSizeQueueColor:ApplyToggle.dueMethodColor] forState:UIControlStateNormal];
    } else {
        
        [self setBackgroundImage:[UIImage flashSizeQueueColor:ApplyToggle.dueMethodColor] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage flashSizeQueueColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.layer.cornerRadius = ApplyToggle.findSwipeOur.suchDominant;
    self.layer.masksToBounds = YES;
    
    self.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5);
    
    [self sizeToFit];

    
    [self addTarget:self action:@selector(rainDietaryClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (void)rainDietaryClicked {
    [self lengthRotorEquallySpaYou];
    if (self.holdTapSexRetAction) {
        self.holdTapSexRetAction();
    }
}


- (void)lengthRotorEquallySpaYou {
    self.enabled = NO;
    self.obtainVisitorDegreesInviteeOldestVisible = self.hisWarpLayerSentencesContentsCriteria;
    [self cutterPrefixIconSinOpenNeed];
    
    
    self.roleSumPutSinkTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(askBeaconCellphoneTrapHeadline:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)askBeaconCellphoneTrapHeadline:(NSTimer *)burst {
    self.obtainVisitorDegreesInviteeOldestVisible--;
    if (self.obtainVisitorDegreesInviteeOldestVisible <= 0) {
        [self decodingPlatformConverterCroatianVolumes];
    } else {
        [self cutterPrefixIconSinOpenNeed];
    }
}


- (void)cutterPrefixIconSinOpenNeed {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",ApplyToggle.subDayEventDay.ignoredPresenceStartTwitterFollowerBothCode, (long)self.obtainVisitorDegreesInviteeOldestVisible];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)decodingPlatformConverterCroatianVolumes {
    [self.roleSumPutSinkTimer invalidate];
    self.roleSumPutSinkTimer = nil;
    self.enabled = YES;
    [self setTitle:self.boundRollbackMissingBayerRectum forState:UIControlStateNormal];
}

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

@end
