






#import "OwnSignZoomButton.h"
#import "IndicesBest.h"
#import "UIImage+SumImage.h"
#import "SDWebImageManager.h"

@interface OwnSignZoomButton ()


@property (nonatomic, strong) NSTimer *courseSequenceTimer;

@property (nonatomic, assign) NSInteger drivenExpansionUppercaseSoloEscapedAir;

@property (nonatomic, copy) NSString *disorderFourthKitNapInstances;

@end

@implementation OwnSignZoomButton

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

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


- (void)fillSpecifyDismissedTrainerDue {
    
    self.kindPlayableSlovakSayBinRelation = 60;
    self.disorderFourthKitNapInstances = IndicesBest.linerSharpness.grammarNineFourStorageUnwindingPhoneCode;
    [self setTitle:self.disorderFourthKitNapInstances forState:UIControlStateNormal];

    
    NSString *volatileCause = [IndicesBest pubDebuggingArcheryFollowerSimpleImage];
    if (volatileCause) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:volatileCause]
                                                    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 clipSigmaDolbyColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [self setBackgroundImage:[UIImage clipSigmaDolbyColor:IndicesBest.sexExtrasColor] forState:UIControlStateNormal];
    } else {
        
        [self setBackgroundImage:[UIImage clipSigmaDolbyColor:IndicesBest.sexExtrasColor] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage clipSigmaDolbyColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

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

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


- (void)speedAirAddClicked {
    [self assistiveOuncesResultingChatterRun];
    if (self.fadeSheArtDidAction) {
        self.fadeSheArtDidAction();
    }
}


- (void)assistiveOuncesResultingChatterRun {
    self.enabled = NO;
    self.drivenExpansionUppercaseSoloEscapedAir = self.kindPlayableSlovakSayBinRelation;
    [self olympusLayerDiagnoseMidSpectralMusical];
    
    
    self.courseSequenceTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(terabytesSpaCompileExclusionFrequency:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)terabytesSpaCompileExclusionFrequency:(NSTimer *)focal {
    self.drivenExpansionUppercaseSoloEscapedAir--;
    if (self.drivenExpansionUppercaseSoloEscapedAir <= 0) {
        [self legibleNowDeviceDogGenerator];
    } else {
        [self olympusLayerDiagnoseMidSpectralMusical];
    }
}


- (void)olympusLayerDiagnoseMidSpectralMusical {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",IndicesBest.linerSharpness.inventoryTryMonotonicTeamFunkAskCode, (long)self.drivenExpansionUppercaseSoloEscapedAir];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)legibleNowDeviceDogGenerator {
    [self.courseSequenceTimer invalidate];
    self.courseSequenceTimer = nil;
    self.enabled = YES;
    [self setTitle:self.disorderFourthKitNapInstances forState:UIControlStateNormal];
}

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

@end
