






#import "SecureSizePipeButton.h"
#import "UserArtRoot.h"
#import "UIImage+WasImage.h"
#import "RateGrowYahooController.h"
#import "UIImage+WasImage.h"
#import "UIColor+NotColor.h"

@implementation SecureSizePipeButton

- (instancetype)initExitsTabGetViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.canTalkSlopeViewController = viewController;
        [self buttonsFourEntryVisibleColumns];
    }
    return self;
}


- (void)buttonsFourEntryVisibleColumns {
    
    NSArray *kernelRemotelyMaxQuechuaTagging = [SlidingPickArrangerAssetIndices heartbeatForbidFollowVersionDisplayed:[ReduceTags class]];
    
    
    NSString *lovePlaceMalayCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block ReduceTags *bulgarianAbout = nil;
    [kernelRemotelyMaxQuechuaTagging enumerateObjectsUsingBlock:^(ReduceTags *country, NSUInteger idx, BOOL *stop) {
        if ([country.whoEncodingsCode caseInsensitiveCompare:lovePlaceMalayCode] == NSOrderedSame) {
            bulgarianAbout = country;
            *stop = YES; 
        }
    }];
    self.tradModernProgramAffineView = bulgarianAbout;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",UserArtRoot.wayAbortLove.standFireAway, bulgarianAbout.stateMileCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *retWristImage = [UIImage containerModifiersAskSceneOuterName:UserArtRoot.wayAbortLove.deepNumeratorClustersFreezingTatarConclude];
    
    
    CGSize havePassiveSize = CGSizeMake(13, 13); 
    
    
    UIImage *bagBoxImage = [self didSeePhaseEyeImage:retWristImage carPlaneSize:havePassiveSize];
    
    
    [self setImage:bagBoxImage forState:UIControlStateNormal];
    [self setImage:[bagBoxImage 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 solutionsLeaveColor:[UserArtRoot.partBoostColor tagHumidityDitheredSymbolicFlashPetite:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage solutionsLeaveColor:[[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(skinDrawCarClicked) forControlEvents:UIControlEventTouchUpInside];
}


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


- (void)skinDrawCarClicked {
    UnlikelyOwnAdverbExportingItsWarnViewController *sob = [UnlikelyOwnAdverbExportingItsWarnViewController new];
    sob.diastolicDelegate = self;
    [self.canTalkSlopeViewController.navigationController pushViewController:sob animated:NO];
}

- (void)surfaceDebuggingDeepCityMoreWetGallonPower:(ReduceTags *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",UserArtRoot.wayAbortLove.standFireAway, country.stateMileCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.tradModernProgramAffineView = country;
}

- (void)dealloc {
    
}
@end
