






#import "IndigoPrepRealButton.h"
#import "RedFlexible.h"
#import "UIImage+DryImage.h"
#import "TypeEffectiveController.h"
#import "UIImage+DryImage.h"
#import "UIColor+HerColor.h"

@implementation IndigoPrepRealButton

- (instancetype)initIcyKeyPlaneViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.freePlatformViewController = viewController;
        [self farFinishCloudFunctionNiacin];
    }
    return self;
}


- (void)farFinishCloudFunctionNiacin {
    
    NSArray *eventualHexAdvisedAnnotatedExercise = [GroupingWarnMaxGlyphScript basalDownhillInferiorsScrollDetailed:[PopoverHue class]];
    
    
    NSString *combinedSelectCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block PopoverHue *beginningPaste = nil;
    [eventualHexAdvisedAnnotatedExercise enumerateObjectsUsingBlock:^(PopoverHue *country, NSUInteger idx, BOOL *stop) {
        if ([country.bannerRedEndCode caseInsensitiveCompare:combinedSelectCode] == NSOrderedSame) {
            beginningPaste = country;
            *stop = YES; 
        }
    }];
    self.accountAmericanEndsLossAddress = beginningPaste;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",RedFlexible.capContinued.eraCompactEgg, beginningPaste.primariesCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *plainTagImage = [UIImage detectedSeeExpectsSamplingEndsName:RedFlexible.capContinued.redefinedExtendForbiddenEdgaCarEphemeral];
    
    
    CGSize undoFlagKinSize = CGSizeMake(13, 13); 
    
    
    UIImage *bypassImage = [self revertChatHomeImage:plainTagImage skipShowSize:undoFlagKinSize];
    
    
    UIImage *templateImage = [bypassImage 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(fitDigitSeeClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)revertChatHomeImage:(UIImage *)image skipShowSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat wasZoneEnd = targetSize.width / image.size.width;
    CGFloat slabArmStay = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(wasZoneEnd, slabArmStay);
    
    
    CGRect hiddenRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - hiddenRect.size.width) / 2.0,
                               (targetSize.height - hiddenRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                hiddenRect.size.width,
                                hiddenRect.size.height)];
    
    UIImage *maxImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return maxImage;
}


- (void)fitDigitSeeClicked {
    EggHueMaintainDropVersionsRecorderViewController *fix = [EggHueMaintainDropVersionsRecorderViewController new];
    fix.slowEqualDelegate = self;
    [self.freePlatformViewController.navigationController pushViewController:fix animated:NO];
}

- (void)unlockOutputCutterOutDatabaseUbiquitySpineWrite:(PopoverHue *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",RedFlexible.capContinued.eraCompactEgg, country.primariesCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.accountAmericanEndsLossAddress = country;
}

- (void)dealloc {
    
}
@end
