






#import "HowMidLogStoreButton.h"
#import "InvertPinch.h"
#import "UIImage+WayImage.h"
#import "PolicyProxiesController.h"
#import "UIImage+WayImage.h"
#import "UIColor+NotColor.h"

@implementation HowMidLogStoreButton

- (instancetype)initAuditOutputViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.withinBinAirViewController = viewController;
        [self mildMathManAdvisoryBreak];
    }
    return self;
}


- (void)mildMathManAdvisoryBreak {
    
    NSArray *sugarRenderOneEditorFatal = [FeatureOptionalBondMayFor urgencySubsetDaysVitalityFlight:[FullOneBox class]];
    
    
    NSString *barSonFatalBoxCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block FullOneBox *dayWinZoneFill = nil;
    [sugarRenderOneEditorFatal enumerateObjectsUsingBlock:^(FullOneBox *country, NSUInteger idx, BOOL *stop) {
        if ([country.alpineSubsetCode caseInsensitiveCompare:barSonFatalBoxCode] == NSOrderedSame) {
            dayWinZoneFill = country;
            *stop = YES; 
        }
    }];
    self.gigahertzWrongReviewDisplayedPublisher = dayWinZoneFill;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",InvertPinch.didThousands.showCupEraSum, dayWinZoneFill.cellphoneCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *jumpKnowImage = [UIImage redirectsDeveloperTemporalSameMotionName:InvertPinch.didThousands.localeAdaptorShowCroppingFourPeople];
    
    
    CGSize winOddPlateSize = CGSizeMake(13, 13); 
    
    
    UIImage *largerImage = [self askAllBlendBigImage:jumpKnowImage floatOldSize:winOddPlateSize];
    
    
    [self setImage:largerImage forState:UIControlStateNormal];
    [self setImage:[largerImage 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 airAxesMoodPenColor:[InvertPinch.indicatedColor willRateProduceAlienLogBed:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage airAxesMoodPenColor:[[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(maxOurQueryClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)askAllBlendBigImage:(UIImage *)image floatOldSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat twoBigLift = targetSize.width / image.size.width;
    CGFloat sawWasClose = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(twoBigLift, sawWasClose);
    
    
    CGRect subOffRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - subOffRect.size.width) / 2.0,
                               (targetSize.height - subOffRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                subOffRect.size.width,
                                subOffRect.size.height)];
    
    UIImage *hisImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return hisImage;
}


- (void)maxOurQueryClicked {
    FailureWorkingBirthdayArbiterDriveMegawattsViewController *net = [FailureWorkingBirthdayArbiterDriveMegawattsViewController new];
    net.rainFloorDelegate = self;
    [self.withinBinAirViewController.navigationController pushViewController:net animated:NO];
}

- (void)pluralPersianBiometryOrganizeCycleInfoSeeDeclined:(FullOneBox *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",InvertPinch.didThousands.showCupEraSum, country.cellphoneCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.gigahertzWrongReviewDisplayedPublisher = country;
}

- (void)dealloc {
    
}
@end
