






#import "SpotlightPointButton.h"
#import "SchemesSong.h"
#import "UIImage+TooImage.h"
#import "DailyMoodFactController.h"
#import "UIImage+TooImage.h"
#import "UIColor+RedColor.h"

@implementation SpotlightPointButton

- (instancetype)initRunRunShapeViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.kitBitNumberViewController = viewController;
        [self criticalTwoPlatformBikeJob];
    }
    return self;
}


- (void)criticalTwoPlatformBikeJob {
    
    NSArray *exceedsRemovableStakeBinWeek = [AscendedFailLiftChromaticLambda startFilteredQuickCanonicalPlayable:[RequireTap class]];
    
    
    NSString *commentAlcoholCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block RequireTap *wayMoreArtSign = nil;
    [exceedsRemovableStakeBinWeek enumerateObjectsUsingBlock:^(RequireTap *country, NSUInteger idx, BOOL *stop) {
        if ([country.kinBadgeChatCode caseInsensitiveCompare:commentAlcoholCode] == NSOrderedSame) {
            wayMoreArtSign = country;
            *stop = YES; 
        }
    }];
    self.whoHandledAdvanceDarkStreams = wayMoreArtSign;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",SchemesSong.targetRemote.panIdiomReady, wayMoreArtSign.hitEnableCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *tapStakeImage = [UIImage needExecutingPopoverPivotSlabName:SchemesSong.targetRemote.popObsoleteExchangesLocalizesWaitFeet];
    
    
    CGSize hueUsageAddSize = CGSizeMake(13, 13); 
    
    
    UIImage *optYetImage = [self saltArtSawRopeImage:tapStakeImage presenceSize:hueUsageAddSize];
    
    
    UIImage *templateImage = [optYetImage 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(editItemLogClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)saltArtSawRopeImage:(UIImage *)image presenceSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat seekOurSin = targetSize.width / image.size.width;
    CGFloat wayUploaded = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(seekOurSin, wayUploaded);
    
    
    CGRect youLowRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - youLowRect.size.width) / 2.0,
                               (targetSize.height - youLowRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                youLowRect.size.width,
                                youLowRect.size.height)];
    
    UIImage *endImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return endImage;
}


- (void)editItemLogClicked {
    RussianWonTapsPastDisablesPrincipalViewController *but = [RussianWonTapsPastDisablesPrincipalViewController new];
    but.exportingDelegate = self;
    [self.kitBitNumberViewController.navigationController pushViewController:but animated:NO];
}

- (void)hungarianSoftChestSubgroupsFinishingLanguageVitalityRectangle:(RequireTap *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",SchemesSong.targetRemote.panIdiomReady, country.hitEnableCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.whoHandledAdvanceDarkStreams = country;
}

- (void)dealloc {
    
}
@end
