






#import "YouWrapBestGetButton.h"
#import "LearnWeekly.h"
#import "UIImage+EarImage.h"
#import "WelshAutoHintController.h"
#import "UIImage+EarImage.h"
#import "UIColor+WhoColor.h"

@implementation YouWrapBestGetButton

- (instancetype)initTooColorSonViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.helpBarAlbumViewController = viewController;
        [self breakStrictlyWayHiddenSolve];
    }
    return self;
}


- (void)breakStrictlyWayHiddenSolve {
    
    NSArray *preparingCarPublicFriendsBetween = [MindfulBridgedArtPaceDown futureLittleWinSexUrgency:[BrandRenew class]];
    
    
    NSString *microBurnThreeCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block BrandRenew *peakItemAscent = nil;
    [preparingCarPublicFriendsBetween enumerateObjectsUsingBlock:^(BrandRenew *country, NSUInteger idx, BOOL *stop) {
        if ([country.hexCacheGoalCode caseInsensitiveCompare:microBurnThreeCode] == NSOrderedSame) {
            peakItemAscent = country;
            *stop = YES; 
        }
    }];
    self.slowSyntaxBypassWriteSubgroups = peakItemAscent;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",LearnWeekly.reuseRenewal.bondArmDueOne, peakItemAscent.yardLaterCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *subgroupImage = [UIImage resourcesFunAskHandoffSaltName:LearnWeekly.reuseRenewal.slashedTrashExpandingRecordOffAir];
    
    
    CGSize gramStretchSize = CGSizeMake(13, 13); 
    
    
    UIImage *winEraImage = [self commentsPeriodImage:subgroupImage scoreMixSize:gramStretchSize];
    
    
    UIImage *templateImage = [winEraImage 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(volatileNapClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)commentsPeriodImage:(UIImage *)image scoreMixSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat upsideLoud = targetSize.width / image.size.width;
    CGFloat offCoastAnd = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(upsideLoud, offCoastAnd);
    
    
    CGRect oldestRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - oldestRect.size.width) / 2.0,
                               (targetSize.height - oldestRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                oldestRect.size.width,
                                oldestRect.size.height)];
    
    UIImage *bigImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return bigImage;
}


- (void)volatileNapClicked {
    CollapsesGarbageOperationSharingStarInsertViewController *fax = [CollapsesGarbageOperationSharingStarInsertViewController new];
    fax.converterDelegate = self;
    [self.helpBarAlbumViewController.navigationController pushViewController:fax animated:NO];
}

- (void)areOverlapDemandDublinCreatorYearsVeryLandmark:(BrandRenew *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",LearnWeekly.reuseRenewal.bondArmDueOne, country.yardLaterCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.slowSyntaxBypassWriteSubgroups = country;
}

- (void)dealloc {
    
}
@end
