






#import "PathBaseMayButton.h"
#import "SafeWaxSort.h"
#import "UIImage+BadImage.h"
#import "SDWebImageManager.h"

@interface PathBaseMayButton ()


@property (nonatomic, strong) NSTimer *goalSerifCurveTimer;

@property (nonatomic, assign) NSInteger littleMainDeletionPersonalPeopleShe;

@property (nonatomic, copy) NSString *sidePlugAllDecodingAligned;

@end

@implementation PathBaseMayButton

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

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


- (void)outPhonePendingScannerHidden {
    
    self.deferredLoseBinRowChatterWrist = 60;
    self.sidePlugAllDecodingAligned = SafeWaxSort.oldBothLogStop.perfusionReceiverZoneLinkPrintableIcyCode;
    [self setTitle:self.sidePlugAllDecodingAligned forState:UIControlStateNormal];

    
    NSString *consumedDelay = [SafeWaxSort sobMillAdjustingMonitoredItemImage];
    if (consumedDelay) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:consumedDelay]
                                                    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 focusingNiacinColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [self setBackgroundImage:[UIImage focusingNiacinColor:SafeWaxSort.teluguDidColor] forState:UIControlStateNormal];
    } else {
        
        [self setBackgroundImage:[UIImage focusingNiacinColor:SafeWaxSort.teluguDidColor] forState:UIControlStateNormal];
        [self setBackgroundImage:[UIImage focusingNiacinColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

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

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


- (void)outJapaneseClicked {
    [self certAssertionJustBeatSpeed];
    if (self.segmentUnsafeAction) {
        self.segmentUnsafeAction();
    }
}


- (void)certAssertionJustBeatSpeed {
    self.enabled = NO;
    self.littleMainDeletionPersonalPeopleShe = self.deferredLoseBinRowChatterWrist;
    [self fusionAuditSettingAlphaLargeOptical];
    
    
    self.goalSerifCurveTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                                 target:self
                                                               selector:@selector(packetVisibleLimitedSymptomAmbiguous:)
                                                               userInfo:nil
                                                                repeats:YES];
}


- (void)packetVisibleLimitedSymptomAmbiguous:(NSTimer *)drive {
    self.littleMainDeletionPersonalPeopleShe--;
    if (self.littleMainDeletionPersonalPeopleShe <= 0) {
        [self disparityAgeRealSwahiliBadminton];
    } else {
        [self fusionAuditSettingAlphaLargeOptical];
    }
}


- (void)fusionAuditSettingAlphaLargeOptical {
    NSString *title = [NSString stringWithFormat:@"%@(%ld)",SafeWaxSort.oldBothLogStop.netscapeInsertionReportingKinPlaceInvertedCode, (long)self.littleMainDeletionPersonalPeopleShe];
    [self setTitle:title forState:UIControlStateDisabled];
}


- (void)disparityAgeRealSwahiliBadminton {
    [self.goalSerifCurveTimer invalidate];
    self.goalSerifCurveTimer = nil;
    self.enabled = YES;
    [self setTitle:self.sidePlugAllDecodingAligned forState:UIControlStateNormal];
}

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

@end
