






#import "RopeTooPinEditButton.h"
#import "ReadWaxDash.h"
#import "UIImage+SeeImage.h"
#import "OddHumanAngleController.h"
#import "UIImage+SeeImage.h"
#import "UIColor+SubColor.h"

@implementation RopeTooPinEditButton

- (instancetype)initTrimmingCapViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.swapClangOddViewController = viewController;
        [self subLighterAlpineNiacinSensor];
    }
    return self;
}


- (void)subLighterAlpineNiacinSensor {
    
    NSArray *feedbackIssuerFinalMidArt = [PanelMoodContactsPatchSquared valueGallonSentencesElevatedStroked:[SinClicked class]];
    
    
    NSString *parameterRenewCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block SinClicked *hardJobIllBold = nil;
    [feedbackIssuerFinalMidArt enumerateObjectsUsingBlock:^(SinClicked *country, NSUInteger idx, BOOL *stop) {
        if ([country.panScalarAskCode caseInsensitiveCompare:parameterRenewCode] == NSOrderedSame) {
            hardJobIllBold = country;
            *stop = YES; 
        }
    }];
    self.oddFilteredExceptionScopeDuctility = hardJobIllBold;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",ReadWaxDash.strideFooter.accountDanish, hardJobIllBold.headGreenCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *vitalSheImage = [UIImage stiffnessProfilesLoadSheetRealmName:ReadWaxDash.strideFooter.bitmapResultingTraitMountedBehaveScroll];
    
    
    CGSize busFilenameSize = CGSizeMake(13, 13); 
    
    
    UIImage *bigHasImage = [self lowerMidNowFatImage:vitalSheImage scaleOurSize:busFilenameSize];
    
    
    UIImage *templateImage = [bigHasImage 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(pubRawPinchClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)lowerMidNowFatImage:(UIImage *)image scaleOurSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat starLogWay = targetSize.width / image.size.width;
    CGFloat keyPongFire = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(starLogWay, keyPongFire);
    
    
    CGRect kinAirRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - kinAirRect.size.width) / 2.0,
                               (targetSize.height - kinAirRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                kinAirRect.size.width,
                                kinAirRect.size.height)];
    
    UIImage *boxImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return boxImage;
}


- (void)pubRawPinchClicked {
    AppendTailFailCivilInferiorsEllipsisViewController *job = [AppendTailFailCivilInferiorsEllipsisViewController new];
    job.noticeAreDelegate = self;
    [self.swapClangOddViewController.navigationController pushViewController:job animated:NO];
}

- (void)digitOuterAdditiveHexStorylineRatingsPhoneLossy:(SinClicked *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",ReadWaxDash.strideFooter.accountDanish, country.headGreenCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.oddFilteredExceptionScopeDuctility = country;
}

- (void)dealloc {
    
}
@end
