






#import "FaxSheLessRoleButton.h"
#import "MenTintSave.h"
#import "UIImage+WasImage.h"
#import "TwoGreaterIllController.h"
#import "UIImage+WasImage.h"
#import "UIColor+RowColor.h"

@implementation FaxSheLessRoleButton

- (instancetype)initMileSlabTapViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.tooMenstrualViewController = viewController;
        [self nibblesEyeNegateYoungerPresented];
    }
    return self;
}


- (void)nibblesEyeNegateYoungerPresented {
    
    NSArray *mapBloodBundleSquaresArbiter = [OutletCupFoggyGroupingSeven procedureImageOldAnyExported:[OurDoneTap class]];
    
    
    NSString *historyDetailsCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block OurDoneTap *flatSizeMixTap = nil;
    [mapBloodBundleSquaresArbiter enumerateObjectsUsingBlock:^(OurDoneTap *country, NSUInteger idx, BOOL *stop) {
        if ([country.refreshGuideCode caseInsensitiveCompare:historyDetailsCode] == NSOrderedSame) {
            flatSizeMixTap = country;
            *stop = YES; 
        }
    }];
    self.waxSmartTapSucceedOld = flatSizeMixTap;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",MenTintSave.ironRouteMix.trustSeeModal, flatSizeMixTap.panListenCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *waxInuitImage = [UIImage cautionPreservesLevelEnglishFlowName:MenTintSave.ironRouteMix.butterflyRecordedBandwidthBehaviorSingleRouter];
    
    
    CGSize waxVitalSumSize = CGSizeMake(13, 13); 
    
    
    UIImage *vortexImage = [self armKeepPipeAddImage:waxInuitImage unitNearSize:waxVitalSumSize];
    
    
    UIImage *templateImage = [vortexImage 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(funFrontWonClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)armKeepPipeAddImage:(UIImage *)image unitNearSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat restoreAre = targetSize.width / image.size.width;
    CGFloat airStroking = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(restoreAre, airStroking);
    
    
    CGRect boxSunRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - boxSunRect.size.width) / 2.0,
                               (targetSize.height - boxSunRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                boxSunRect.size.width,
                                boxSunRect.size.height)];
    
    UIImage *napImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return napImage;
}


- (void)funFrontWonClicked {
    PedometerSeparatorCanceledPaymentsSunPencilViewController *bin = [PedometerSeparatorCanceledPaymentsSunPencilViewController new];
    bin.binDegreeDelegate = self;
    [self.tooMenstrualViewController.navigationController pushViewController:bin animated:NO];
}

- (void)mildEdgaModalSoftLengthsCrossLightAsk:(OurDoneTap *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",MenTintSave.ironRouteMix.trustSeeModal, country.panListenCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.waxSmartTapSucceedOld = country;
}

- (void)dealloc {
    
}
@end
