






#import "ActiveFontRealButton.h"
#import "MixSnowBits.h"
#import "UIImage+ForImage.h"
#import "QueueAmericanController.h"
#import "UIImage+ForImage.h"
#import "UIColor+PenColor.h"

@implementation ActiveFontRealButton

- (instancetype)initBlueFlippedViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.revertKitArmViewController = viewController;
        [self predictedTargetedLinearTapCost];
    }
    return self;
}


- (void)predictedTargetedLinearTapCost {
    
    NSArray *lowSquaredSegmentedHalftonePin = [FeatAlienPositivePlaceNotifies aspectOffsetsUsabilityKelvinBig:[KinAmharic class]];
    
    
    NSString *hueHostShotLogCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block KinAmharic *teethAreaWrite = nil;
    [lowSquaredSegmentedHalftonePin enumerateObjectsUsingBlock:^(KinAmharic *country, NSUInteger idx, BOOL *stop) {
        if ([country.popSimpleHerCode caseInsensitiveCompare:hueHostShotLogCode] == NSOrderedSame) {
            teethAreaWrite = country;
            *stop = YES; 
        }
    }];
    self.busExecuteHandshakeFamilyFeedback = teethAreaWrite;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",MixSnowBits.packRouteToo.cutDestroyWay, teethAreaWrite.fastLearnCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *bagCloudImage = [UIImage attributeLocaleFixingSequencesProvinceName:MixSnowBits.packRouteToo.utteranceMessagingGenericsFatalFarAlive];
    
    
    CGSize actualFarsiSize = CGSizeMake(13, 13); 
    
    
    UIImage *resumeImage = [self runMainBitIconImage:bagCloudImage templateSize:actualFarsiSize];
    
    
    UIImage *templateImage = [resumeImage 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(seeTakeEachClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)runMainBitIconImage:(UIImage *)image templateSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat foreverRun = targetSize.width / image.size.width;
    CGFloat jobDigitMid = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(foreverRun, jobDigitMid);
    
    
    CGRect resumeRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - resumeRect.size.width) / 2.0,
                               (targetSize.height - resumeRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                resumeRect.size.width,
                                resumeRect.size.height)];
    
    UIImage *carImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return carImage;
}


- (void)seeTakeEachClicked {
    KurdishUnlockedYardTenInviteeOlympusViewController *sun = [KurdishUnlockedYardTenInviteeOlympusViewController new];
    sun.interOnceDelegate = self;
    [self.revertKitArmViewController.navigationController pushViewController:sun animated:NO];
}

- (void)eraBitsScheduledFlipDroppedRelayLocatorFirst:(KinAmharic *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",MixSnowBits.packRouteToo.cutDestroyWay, country.fastLearnCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.busExecuteHandshakeFamilyFeedback = country;
}

- (void)dealloc {
    
}
@end
