






#import "SmoothedRevertButton.h"
#import "YahooKeyTip.h"
#import "UIImage+DidImage.h"
#import "UseOurArtLinkController.h"
#import "UIImage+DidImage.h"
#import "UIColor+BadColor.h"

@implementation SmoothedRevertButton

- (instancetype)initSkinDryLoadViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.waxFoldHumanViewController = viewController;
        [self keysSchemeAppendPhoneticMute];
    }
    return self;
}


- (void)keysSchemeAppendPhoneticMute {
    
    NSArray *featuredSimulatesRussianDivideTwo = [SessionDeletionVitalityArtistWarn readableMenstrualDueInitialUniform:[CallDidSin class]];
    
    
    NSString *measureAccountCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block CallDidSin *charPointSplat = nil;
    [featuredSimulatesRussianDivideTwo enumerateObjectsUsingBlock:^(CallDidSin *country, NSUInteger idx, BOOL *stop) {
        if ([country.wetWakeDraftCode caseInsensitiveCompare:measureAccountCode] == NSOrderedSame) {
            charPointSplat = country;
            *stop = YES; 
        }
    }];
    self.foundStringProtectedPendingOrdering = charPointSplat;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",YahooKeyTip.tatarMaximum.spaZipFlipped, charPointSplat.oldPashtoCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *agentSunImage = [UIImage badmintonScanLogWorkflowShadowName:YahooKeyTip.tatarMaximum.coercionRenewSoloMicroHandledIteration];
    
    
    CGSize chatMapManySize = CGSizeMake(13, 13); 
    
    
    UIImage *artPenImage = [self hailHisOurCubeImage:agentSunImage locationSize:chatMapManySize];
    
    
    UIImage *templateImage = [artPenImage 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(fairInfoFixClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)hailHisOurCubeImage:(UIImage *)image locationSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat packetsMid = targetSize.width / image.size.width;
    CGFloat warnSpaDeny = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(packetsMid, warnSpaDeny);
    
    
    CGRect masterRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - masterRect.size.width) / 2.0,
                               (targetSize.height - masterRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                masterRect.size.width,
                                masterRect.size.height)];
    
    UIImage *illImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return illImage;
}


- (void)fairInfoFixClicked {
    SubmitYoungerSubjectInputCricketEditViewController *fax = [SubmitYoungerSubjectInputCricketEditViewController new];
    fax.appearingDelegate = self;
    [self.waxFoldHumanViewController.navigationController pushViewController:fax animated:NO];
}

- (void)subtitleRepairCarWhoDisposeEffortSessionYard:(CallDidSin *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",YahooKeyTip.tatarMaximum.spaZipFlipped, country.oldPashtoCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.foundStringProtectedPendingOrdering = country;
}

- (void)dealloc {
    
}
@end
