






#import "AdoptShearHelpButton.h"
#import "WinSubAbove.h"
#import "UIImage+TooImage.h"
#import "OddPromiseBinController.h"
#import "UIImage+TooImage.h"
#import "UIColor+FunColor.h"

@implementation AdoptShearHelpButton

- (instancetype)initOffLeapHeapViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.selfTwoVideoViewController = viewController;
        [self visibleOldestRouteTabShoulder];
    }
    return self;
}


- (void)visibleOldestRouteTabShoulder {
    
    NSArray *pinPickMoreGetNine = [AgeGuaraniSmoothedManagerReload recorderAirClockPolarModify:[RingReduce class]];
    
    
    NSString *metalWithAuditCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block RingReduce *flashTextOccur = nil;
    [pinPickMoreGetNine enumerateObjectsUsingBlock:^(RingReduce *country, NSUInteger idx, BOOL *stop) {
        if ([country.stoodCalorieCode caseInsensitiveCompare:metalWithAuditCode] == NSOrderedSame) {
            flashTextOccur = country;
            *stop = YES; 
        }
    }];
    self.trialPositivePinkMinTip = flashTextOccur;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",WinSubAbove.swipeFlagDay.ownAreWakeUse, flashTextOccur.sumLambdaCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *faxThumbImage = [UIImage cricketKinSaveElevationDiskName:WinSubAbove.swipeFlagDay.basqueScaleFreezingDrawingTowerDry];
    
    
    CGSize loadIcyDashSize = CGSizeMake(13, 13); 
    
    
    UIImage *cupCatImage = [self peakAxesNowFitImage:faxThumbImage icyShelfSize:loadIcyDashSize];
    
    
    UIImage *templateImage = [cupCatImage 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(skippedFireClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)peakAxesNowFitImage:(UIImage *)image icyShelfSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat canJoining = targetSize.width / image.size.width;
    CGFloat divideBegin = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(canJoining, divideBegin);
    
    
    CGRect tagOffRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - tagOffRect.size.width) / 2.0,
                               (targetSize.height - tagOffRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                tagOffRect.size.width,
                                tagOffRect.size.height)];
    
    UIImage *menImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return menImage;
}


- (void)skippedFireClicked {
    QueryInvalidCatCapPushUnableViewController *cat = [QueryInvalidCatCapPushUnableViewController new];
    cat.minorRaceDelegate = self;
    [self.selfTwoVideoViewController.navigationController pushViewController:cat animated:NO];
}

- (void)hyphensBlendWarpBrandCutKilometerWorkingNear:(RingReduce *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",WinSubAbove.swipeFlagDay.ownAreWakeUse, country.sumLambdaCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.trialPositivePinkMinTip = country;
}

- (void)dealloc {
    
}
@end
