






#import "SizeSkinWonRunButton.h"
#import "PaceDownHue.h"
#import "UIImage+KeyImage.h"
#import "RankMidSixKinController.h"
#import "UIImage+KeyImage.h"
#import "UIColor+LogColor.h"

@implementation SizeSkinWonRunButton

- (instancetype)initMaxFreeMoleViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.heavySendFixViewController = viewController;
        [self crossOutlineProxyEscapingMutable];
    }
    return self;
}


- (void)crossOutlineProxyEscapingMutable {
    
    NSArray *gurationBehaveTextualSawPrefixes = [AmountInvalidPronounFactoredRaw hoverLogJapaneseMegahertzWord:[SonPickIts class]];
    
    
    NSString *labelEasySegueCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block SonPickIts *barsHostForbid = nil;
    [gurationBehaveTextualSawPrefixes enumerateObjectsUsingBlock:^(SonPickIts *country, NSUInteger idx, BOOL *stop) {
        if ([country.privilegeTheCode caseInsensitiveCompare:labelEasySegueCode] == NSOrderedSame) {
            barsHostForbid = country;
            *stop = YES; 
        }
    }];
    self.diphthongTruncatedHelpFiltersRace = barsHostForbid;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",PaceDownHue.absoluteAuto.affectingLoad, barsHostForbid.notePieceCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *sayHelloImage = [UIImage whoGallonsFemaleReportingSawName:PaceDownHue.absoluteAuto.hectaresDidDecimalAreDiscardedBadge];
    
    
    CGSize sheetDrivenSize = CGSizeMake(13, 13); 
    
    
    UIImage *oldYetImage = [self openDaysNetHueImage:sayHelloImage accurateSize:sheetDrivenSize];
    
    
    [self setImage:oldYetImage forState:UIControlStateNormal];
    [self setImage:[oldYetImage 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 browseMuteMillColor:[PaceDownHue.frequencyColor profilesPosterFavoritesLighterLogicalAdverb:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage browseMuteMillColor:[[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(closeIcyMayClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)openDaysNetHueImage:(UIImage *)image accurateSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat bridgedBus = targetSize.width / image.size.width;
    CGFloat pathFourUse = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(bridgedBus, pathFourUse);
    
    
    CGRect illBinRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - illBinRect.size.width) / 2.0,
                               (targetSize.height - illBinRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                illBinRect.size.width,
                                illBinRect.size.height)];
    
    UIImage *topImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return topImage;
}


- (void)closeIcyMayClicked {
    NarrativeGreekHairRetStillMultipleViewController *dog = [NarrativeGreekHairRetStillMultipleViewController new];
    dog.ownershipDelegate = self;
    [self.heavySendFixViewController.navigationController pushViewController:dog animated:NO];
}

- (void)dogEmbeddingEmbeddingPinkAndPlayManMissing:(SonPickIts *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",PaceDownHue.absoluteAuto.affectingLoad, country.notePieceCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.diphthongTruncatedHelpFiltersRace = country;
}

- (void)dealloc {
    
}
@end
