






#import "WithinLiftTeamButton.h"
#import "LawExported.h"
#import "UIImage+NotImage.h"
#import "YetMayLazyEndController.h"
#import "UIImage+NotImage.h"
#import "UIColor+DryColor.h"

@implementation WithinLiftTeamButton

- (instancetype)initTeamEdgeSinViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.zoneRelativeViewController = viewController;
        [self healthGracefulYellowNoiseMobile];
    }
    return self;
}


- (void)healthGracefulYellowNoiseMobile {
    
    NSArray *foggyMutationsFractionDescentOrigins = [ChatTheClustersAdjustedUpscale entropyWaterySunMinderDecrement:[OffsetsMid class]];
    
    
    NSString *fatPriorNotHitCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block OffsetsMid *mayPhoneIllCat = nil;
    [foggyMutationsFractionDescentOrigins enumerateObjectsUsingBlock:^(OffsetsMid *country, NSUInteger idx, BOOL *stop) {
        if ([country.mostEulerPinCode caseInsensitiveCompare:fatPriorNotHitCode] == NSOrderedSame) {
            mayPhoneIllCat = country;
            *stop = YES; 
        }
    }];
    self.drainAbortedRaceHeadphoneClock = mayPhoneIllCat;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",LawExported.playVersions.sequenceMoire, mayPhoneIllCat.sideWristCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *sayDolbyImage = [UIImage watchedTopExceedsFileInvisibleName:LawExported.playVersions.chinaCertStrongestAngleDestroyRecovery];
    
    
    CGSize hailSeekingSize = CGSizeMake(13, 13); 
    
    
    UIImage *dayLogImage = [self packHerRunLogoImage:sayDolbyImage breakEraSize:hailSeekingSize];
    
    
    [self setImage:dayLogImage forState:UIControlStateNormal];
    [self setImage:[dayLogImage 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 lowSignArmUsedColor:[LawExported.specifierColor badEphemeralGenderFarInfoPartial:8]] forState:UIControlStateNormal];
    [self setBackgroundImage:[UIImage lowSignArmUsedColor:[[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(withImpliedClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)packHerRunLogoImage:(UIImage *)image breakEraSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat anyRecycle = targetSize.width / image.size.width;
    CGFloat keyClaimCut = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(anyRecycle, keyClaimCut);
    
    
    CGRect boxPutRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - boxPutRect.size.width) / 2.0,
                               (targetSize.height - boxPutRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                boxPutRect.size.width,
                                boxPutRect.size.height)];
    
    UIImage *hasImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return hasImage;
}


- (void)withImpliedClicked {
    PacketsPinChromeSecondsInitialPrefixViewController *our = [PacketsPinChromeSecondsInitialPrefixViewController new];
    our.menWeeklyDelegate = self;
    [self.zoneRelativeViewController.navigationController pushViewController:our animated:NO];
}

- (void)somaliBackLuminanceChangeMirroringCutAndHighlight:(OffsetsMid *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",LawExported.playVersions.sequenceMoire, country.sideWristCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.drainAbortedRaceHeadphoneClock = country;
}

- (void)dealloc {
    
}
@end
