






#import "NetHisFunEarlyButton.h"
#import "AppleNotify.h"
#import "UIImage+AreImage.h"
#import "BarNodeEraBinController.h"
#import "UIImage+AreImage.h"
#import "UIColor+MenColor.h"

@implementation NetHisFunEarlyButton

- (instancetype)initWalkCorruptViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.positionsLowViewController = viewController;
        [self interruptBehaviorPassivelyCautionEasy];
    }
    return self;
}


- (void)interruptBehaviorPassivelyCautionEasy {
    
    NSArray *tipArmourIntegerEpisodeAffecting = [TipNorthCoverWithNormal vortexZoomAnimationCompareYard:[HisBeacons class]];
    
    
    NSString *cacheExitsBaseCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block HisBeacons *monthTaskUnion = nil;
    [tipArmourIntegerEpisodeAffecting enumerateObjectsUsingBlock:^(HisBeacons *country, NSUInteger idx, BOOL *stop) {
        if ([country.browseTopManCode caseInsensitiveCompare:cacheExitsBaseCode] == NSOrderedSame) {
            monthTaskUnion = country;
            *stop = YES; 
        }
    }];
    self.stalledBadLargestPeakNiacin = monthTaskUnion;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",AppleNotify.emailBestRaw.ownerFlowBase, monthTaskUnion.rateUsageCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *semanticImage = [UIImage midPrettyResolvingRollSequencesName:AppleNotify.emailBestRaw.collectEqualAnchoredSentUnifyNickname];
    
    
    CGSize youEyeAlarmSize = CGSizeMake(13, 13); 
    
    
    UIImage *suddenImage = [self trashImmutableImage:semanticImage theAlertSize:youEyeAlarmSize];
    
    
    [self setImage:suddenImage forState:UIControlStateNormal];
    [self setImage:[suddenImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateHighlighted]; 
    
    
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    
    
    self.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft; 
    CGFloat spacing = 3.0; 
    self.imageEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, -spacing);  
    self.titleEdgeInsets = UIEdgeInsetsMake(0, -spacing, 0, spacing);   
    
    
    [self setBackgroundImage:[UIImage allEarUnitLiftColor:[AppleNotify.hourlyWaxColor allowPositionsRenewingGenericsProvidingAudio:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage allEarUnitLiftColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]]
                   forState:UIControlStateHighlighted];
    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.layer.cornerRadius = 2.f;
    self.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMinXMaxYCorner;
    self.layer.masksToBounds = YES;
    
    
    self.contentEdgeInsets = UIEdgeInsetsMake(8, 12, 8, 12); 
    
    
    [self sizeToFit];
    
    
    [self addTarget:self action:@selector(dueUnlikelyClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)trashImmutableImage:(UIImage *)image theAlertSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat petiteHold = targetSize.width / image.size.width;
    CGFloat weekAnySock = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(petiteHold, weekAnySock);
    
    
    CGRect acrossRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - acrossRect.size.width) / 2.0,
                               (targetSize.height - acrossRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                acrossRect.size.width,
                                acrossRect.size.height)];
    
    UIImage *nowImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return nowImage;
}


- (void)dueUnlikelyClicked {
    BringFailingBuffersRareAssistantBorderViewController *sun = [BringFailingBuffersRareAssistantBorderViewController new];
    sun.makeFullyDelegate = self;
    [self.positionsLowViewController.navigationController pushViewController:sun animated:NO];
}

- (void)officialEarDryRatingsEstimatedBitsMountedScaling:(HisBeacons *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",AppleNotify.emailBestRaw.ownerFlowBase, country.rateUsageCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.stalledBadLargestPeakNiacin = country;
}

- (void)dealloc {
    
}
@end
