






#import "BookReasonMoodButton.h"
#import "BestSharpen.h"
#import "UIImage+LogImage.h"
#import "SegmentedHoldController.h"
#import "UIImage+LogImage.h"
#import "UIColor+TenColor.h"

@implementation BookReasonMoodButton

- (instancetype)initBagWhoAssetViewController:(UIViewController *)viewController {
    self = [super init];
    if (self) {
        self.theSerializeViewController = viewController;
        [self droppedTornadoStrictlyUnifyQuantize];
    }
    return self;
}


- (void)droppedTornadoStrictlyUnifyQuantize {
    
    NSArray *leadCoalescedRenewalPhoneTemp = [PathUniversalThatPagerObserve panPongKilovoltsTradCombined:[MaximumEar class]];
    
    
    NSString *sayScanOldFindCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
    
    __block MaximumEar *tagPongJobTree = nil;
    [leadCoalescedRenewalPhoneTemp enumerateObjectsUsingBlock:^(MaximumEar *country, NSUInteger idx, BOOL *stop) {
        if ([country.replyDeclineCode caseInsensitiveCompare:sayScanOldFindCode] == NSOrderedSame) {
            tagPongJobTree = country;
            *stop = YES; 
        }
    }];
    self.slowHasOnlyTriggersUnify = tagPongJobTree;
    
    
    NSString *title = [NSString stringWithFormat:@"%@%@",BestSharpen.didNapCoptic.authorAllergy, tagPongJobTree.humanLateCode];
    [self setTitle:title forState:UIControlStateNormal];
    
    
    UIImage *armNoiseImage = [UIImage weeklyReportingBirthRevisionsOffName:BestSharpen.didNapCoptic.permittedGroupingMonitoredDictationEffectLimit];
    
    
    CGSize priceOwnHitSize = CGSizeMake(13, 13); 
    
    
    UIImage *kernelImage = [self dailyTimeTamilImage:armNoiseImage idleNameSize:priceOwnHitSize];
    
    
    UIImage *templateImage = [kernelImage 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(linkBedWalkClicked) forControlEvents:UIControlEventTouchUpInside];
}


- (UIImage *)dailyTimeTamilImage:(UIImage *)image idleNameSize:(CGSize)targetSize {
    
    UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0);
    
    
    CGFloat oxygenBook = targetSize.width / image.size.width;
    CGFloat didAttitude = targetSize.height / image.size.height;
    CGFloat scaleFactor = MIN(oxygenBook, didAttitude);
    
    
    CGRect pluralRect = CGRectMake(0, 0,
                                  image.size.width * scaleFactor,
                                  image.size.height * scaleFactor);
    
    
    CGPoint origin = CGPointMake((targetSize.width - pluralRect.size.width) / 2.0,
                               (targetSize.height - pluralRect.size.height) / 2.0);
    [image drawInRect:CGRectMake(origin.x, origin.y,
                                pluralRect.size.width,
                                pluralRect.size.height)];
    
    UIImage *manImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return manImage;
}


- (void)linkBedWalkClicked {
    TenDirtyFillerSubsetThickSlovenianViewController *tap = [TenDirtyFillerSubsetThickSlovenianViewController new];
    tap.sinSubmitDelegate = self;
    [self.theSerializeViewController.navigationController pushViewController:tap animated:NO];
}

- (void)renderPinBigChamberHistoryOverSubsetBend:(MaximumEar *)country {
    NSString *title = [NSString stringWithFormat:@"%@%@",BestSharpen.didNapCoptic.authorAllergy, country.humanLateCode];
    [self setTitle:title forState:UIControlStateNormal];
    self.slowHasOnlyTriggersUnify = country;
}

- (void)dealloc {
    
}
@end
