






#import "SafeTabBarsAndButton.h"
#import "IndicesBest.h"
#import "UIImage+SumImage.h"
#import "KitFootIllAgeController.h"
#import "UIImage+SumImage.h"
#import "UIColor+WaxColor.h"

@implementation SafeTabBarsAndButton

- (instancetype)initEmbeddedAndViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.distinctPeakViewController = viewController;
        [self fillSpecifyDismissedTrainerDue];
    }
    return self;
}


- (void)fillSpecifyDismissedTrainerDue {
    
    NSArray *hostChangingOnceBedLearned = [LettishPaceRetainedFloorExpanding terabytesGreenCreamyAlarmEncode:[LargerPlan class]];
    
    
    NSString *priorIncorrectCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block LargerPlan *aggregateEmail = nil;
    [hostChangingOnceBedLearned enumerateObjectsUsingBlock:^(LargerPlan *country, NSUInteger idx, BOOL *stop) {
        if ([country.spaWayOnlineCode caseInsensitiveCompare:priorIncorrectCode] == NSOrderedSame) {
            aggregateEmail = country;
            *stop = YES; 
        }
    }];
    self.authorEjectStaleSpecifyAnimate = aggregateEmail;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",IndicesBest.trustMainArm.pinBigZoomDid, aggregateEmail.raiseGoalCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *equalSonImage = [UIImage busFactoredSockFlemishDeliveryName:IndicesBest.trustMainArm.shipmentYearEllipsisCapturesPhoneticWindows];
    
    
    CGSize wakeExecAirSize = CGSizeMake(13, 13); 
    
    
    UIImage *submitImage = [self daysCurlDetachImage:equalSonImage dogMatchSize:wakeExecAirSize];
    
    
    UIImage *templateImage = [submitImage 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(speedAirAddClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)daysCurlDetachImage:(UIImage *)image dogMatchSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat menLighter = targetSize.width / image.size.width;
    CGFloat tabFilmLine = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(menLighter, tabFilmLine);
    
    
    CGRect illBadRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - illBadRect.size.width) / 2.0,
                               (targetSize.height - illBadRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                illBadRect.size.width,
                                illBadRect.size.height)];
    
    UIImage *whoImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return whoImage;
}


- (void)speedAirAddClicked {
    ReplacedAssistantForwardAnchoringShuffleAlignViewController *era = [ReplacedAssistantForwardAnchoringShuffleAlignViewController new];
    era.malformedDelegate = self;
    [self.distinctPeakViewController.navigationController pushViewController:era animated:NO];
}

- (void)eggConsumedSourcesSupportedMegawattsGaelicHigherStone:(LargerPlan *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",IndicesBest.trustMainArm.pinBigZoomDid, country.raiseGoalCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.authorEjectStaleSpecifyAnimate = country;
}

- (void)dealloc {
    
}
@end
