






#import "AnimatorSeasonButton.h"
#import "ForHueAfter.h"
#import "UIImage+GetImage.h"
#import "CardioidShearController.h"
#import "UIImage+GetImage.h"
#import "UIColor+SpaColor.h"

@implementation AnimatorSeasonButton

- (instancetype)initRoomUseEachViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.netWayBorderViewController = viewController;
        [self availableOnceRetryMoireWet];
    }
    return self;
}


- (void)availableOnceRetryMoireWet {
    
    NSArray *metadataBuddyManagerThresholdAlive = [SlantVendorExportKindForce butSobBagFrequencyDeclined:[IcyRowPair class]];
    
    
    NSString *boxLowAlbumDidCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block IcyRowPair *modifierPrefix = nil;
    [metadataBuddyManagerThresholdAlive enumerateObjectsUsingBlock:^(IcyRowPair *country, NSUInteger idx, BOOL *stop) {
        if ([country.arrayFarGaspCode caseInsensitiveCompare:boxLowAlbumDidCode] == NSOrderedSame) {
            modifierPrefix = country;
            *stop = YES; 
        }
    }];
    self.integrityFilteredDeviationBounceThree = modifierPrefix;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",ForHueAfter.grayGradient.floatDistance, modifierPrefix.bounceKeyCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *footMileImage = [UIImage thousandClipUnchangedPortionSelectedName:ForHueAfter.grayGradient.varianceFinishingMainMinEventualIntrinsic];
    
    
    CGSize keysAirLockSize = CGSizeMake(13, 13); 
    
    
    UIImage *hexJobImage = [self fatSeeIllBeganImage:footMileImage decipherSize:keysAirLockSize];
    
    
    [self setImage:hexJobImage forState:UIControlStateNormal];
    [self setImage:[hexJobImage 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 readerCoalesceColor:[ForHueAfter.requiringColor lateLiftSerifIcyAllPack:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage readerCoalesceColor:[[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(passGrowJobClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)fatSeeIllBeganImage:(UIImage *)image decipherSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat didWordBus = targetSize.width / image.size.width;
    CGFloat popoverGasp = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(didWordBus, popoverGasp);
    
    
    CGRect ownDayRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - ownDayRect.size.width) / 2.0,
                               (targetSize.height - ownDayRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                ownDayRect.size.width,
                                ownDayRect.size.height)];
    
    UIImage *whoImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return whoImage;
}


- (void)passGrowJobClicked {
    TransformQueryingDetectedTomorrowOuterAcrossViewController *two = [TransformQueryingDetectedTomorrowOuterAcrossViewController new];
    two.warpTokenDelegate = self;
    [self.netWayBorderViewController.navigationController pushViewController:two animated:NO];
}

- (void)clipPhonogramIssuePickerWasThirteenSessionTake:(IcyRowPair *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",ForHueAfter.grayGradient.floatDistance, country.bounceKeyCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.integrityFilteredDeviationBounceThree = country;
}

- (void)dealloc {
    
}
@end
