






#import "ChunkyDaysArtsButton.h"
#import "ScrollDatum.h"
#import "UIImage+SeeImage.h"
#import "SumFindLawOurController.h"
#import "UIImage+SeeImage.h"
#import "UIColor+KeyColor.h"

@implementation ChunkyDaysArtsButton

- (instancetype)initProvidesOddViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.haveMagicSinViewController = viewController;
        [self solutionsExecuteCycleStopPlatform];
    }
    return self;
}


- (void)solutionsExecuteCycleStopPlatform {
    
    NSArray *funPotassiumSymbolsLinearInitially = [ChallengePhotosInterestPenCreator interiorFunnelMediumNetDiphthong:[HaveBecome class]];
    
    
    NSString *halfChromeGrowCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block HaveBecome *midTintDayMole = nil;
    [funPotassiumSymbolsLinearInitially enumerateObjectsUsingBlock:^(HaveBecome *country, NSUInteger idx, BOOL *stop) {
        if ([country.ambiguityAirCode caseInsensitiveCompare:halfChromeGrowCode] == NSOrderedSame) {
            midTintDayMole = country;
            *stop = YES; 
        }
    }];
    self.transientVideoBitmapPoloCompress = midTintDayMole;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",ScrollDatum.tildeStopHit.forPlugBarNot, midTintDayMole.qualifiedCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *sinMediaImage = [UIImage broadcastExtractFlushedTopSentName:ScrollDatum.tildeStopHit.homeSimpleRotatingDeferringUsesConsumes];
    
    
    CGSize sexReadHashSize = CGSizeMake(13, 13); 
    
    
    UIImage *capSpaImage = [self exportingStateImage:sinMediaImage blinkIllSize:sexReadHashSize];
    
    
    [self setImage:capSpaImage forState:UIControlStateNormal];
    [self setImage:[capSpaImage 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 adaptivePromptColor:[ScrollDatum.cinematicColor collapsedSixHourlyEmbeddingRefreshEcho:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage adaptivePromptColor:[[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(unifyDryMinClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)exportingStateImage:(UIImage *)image blinkIllSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat itsGolfSix = targetSize.width / image.size.width;
    CGFloat echoAddFind = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(itsGolfSix, echoAddFind);
    
    
    CGRect negateRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - negateRect.size.width) / 2.0,
                               (targetSize.height - negateRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                negateRect.size.width,
                                negateRect.size.height)];
    
    UIImage *wayImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return wayImage;
}


- (void)unifyDryMinClicked {
    ThreeRangeProcessedExtentsMouseMomentaryViewController *are = [ThreeRangeProcessedExtentsMouseMomentaryViewController new];
    are.theGallonDelegate = self;
    [self.haveMagicSinViewController.navigationController pushViewController:are animated:NO];
}

- (void)altimeterCutUnsafeAreRaiseRainPresencePut:(HaveBecome *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",ScrollDatum.tildeStopHit.forPlugBarNot, country.qualifiedCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.transientVideoBitmapPoloCompress = country;
}

- (void)dealloc {
    
}
@end
