






#import "VerifyCompressButton.h"
#import "TextualTemp.h"
#import "UIImage+GetImage.h"
#import "SheKurdishBarController.h"
#import "UIImage+GetImage.h"
#import "UIColor+UseColor.h"

@implementation VerifyCompressButton

- (instancetype)initBoxCanInnerViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.threeOutcomeViewController = viewController;
        [self holdHighRearRecycleTouch];
    }
    return self;
}


- (void)holdHighRearRecycleTouch {
    
    NSArray *hitManyBleedAlongRace = [WindowsAlbumNibblesIncludingView middleTapsBadAdditionsAcross:[GoalPublic class]];
    
    
    NSString *occurHandArrayCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block GoalPublic *catOldHelloSun = nil;
    [hitManyBleedAlongRace enumerateObjectsUsingBlock:^(GoalPublic *country, NSUInteger idx, BOOL *stop) {
        if ([country.tryFoodMixerCode caseInsensitiveCompare:occurHandArrayCode] == NSOrderedSame) {
            catOldHelloSun = country;
            *stop = YES; 
        }
    }];
    self.sumBracketNotAnimatingNot = catOldHelloSun;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",TextualTemp.cancelsParse.phaseCupReady, catOldHelloSun.logoPanelCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *subgroupImage = [UIImage workGrowBeginAnimatorExcludedName:TextualTemp.cancelsParse.reviewProducedVariationWetFractionFeat];
    
    
    CGSize renewedEastSize = CGSizeMake(13, 13); 
    
    
    UIImage *optPutImage = [self ownKeyWayBreakImage:subgroupImage clustersSize:renewedEastSize];
    
    
    UIImage *templateImage = [optPutImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    [self setImage:templateImage forState:UIControlStateNormal];
    [self setImage:templateImage forState:UIControlStateHighlighted];
    
    self.tintColor = UIColor.darkGrayColor;
    
    
    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 setBackgroundColor:UIColor.clearColor];
    [self setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [self setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
    self.titleLabel.font = [UIFont systemFontOfSize:16];

    
    self.contentEdgeInsets = UIEdgeInsetsMake(8, 12, 8, 12); 
    
    
    [self sizeToFit];
    
    
    [self addTarget:self action:@selector(carChecksumClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)ownKeyWayBreakImage:(UIImage *)image clustersSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat sawGlucose = targetSize.width / image.size.width;
    CGFloat guestWeight = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(sawGlucose, guestWeight);
    
    
    CGRect speechRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - speechRect.size.width) / 2.0,
                               (targetSize.height - speechRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                speechRect.size.width,
                                speechRect.size.height)];
    
    UIImage *airImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return airImage;
}


- (void)carChecksumClicked {
    UpscaleNotSwitchIdenticalCheckingInstancesViewController *opt = [UpscaleNotSwitchIdenticalCheckingInstancesViewController new];
    opt.centeringDelegate = self;
    [self.threeOutcomeViewController.navigationController pushViewController:opt animated:NO];
}

- (void)guaraniOnlyCoachedDownhillMinderSiteSlidingBend:(GoalPublic *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",TextualTemp.cancelsParse.phaseCupReady, country.logoPanelCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.sumBracketNotAnimatingNot = country;
}

- (void)dealloc {
    
}
@end
