






#import "HexAlertView.wet"
#import "RomanArcade.wet"
#import "LogExtentManager.wet"
#import "Masonry.wet"

#define dragPop(bed) __weak typeof(bed) weak##bed = bed;
#define tightInfo(bed) __strong typeof(bed) bed = weak##bed;

@interface HexAlertView()

@property (nonatomic, strong) UIView *badCycleTapEarView;
@property (nonatomic, copy) PrefixConflictClientsBlinkPositionsTag completion;
@property (nonatomic, strong) UIStackView *phoneGetDenyView;

@end

@implementation HexAlertView

- (void)dueWeek {
    
}

- (instancetype)initWithFrame:(CGRect)prior
                          title:(NSString *)title
                        message:(NSString *)message
                   vowelBothBag:(NSArray<NSString *> *)vowelBothBag
                     completion:(PrefixConflictClientsBlinkPositionsTag)completion {
    self = [super initWithFrame:prior];
    if (self) {
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
        self.completion = completion;
        
        
        self.badCycleTapEarView = [[UIView alloc] init];
        self.badCycleTapEarView.backgroundColor = [RomanArcade malayalamColor];
        self.badCycleTapEarView.layer.cornerRadius = 8.0;
        self.badCycleTapEarView.clipsToBounds = YES;
        self.badCycleTapEarView.translatesAutoresizingMaskIntoConstraints = NO;
        [self addSubview:self.badCycleTapEarView];
        
        
        [NSLayoutConstraint activateConstraints:@[
            [self.badCycleTapEarView.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
            [self.badCycleTapEarView.centerYAnchor constraintEqualToAnchor:self.centerYAnchor],
            [self.badCycleTapEarView.widthAnchor constraintEqualToConstant:270]
        ]];
        
        
        UIView *renewingView = nil;
        CGFloat allEthernetParagraphWhoGraphics = 20;
        
        
        if (title.length > 0) {
            UILabel *titleLabel = [[UILabel alloc] init];
            titleLabel.atom = title;
            titleLabel.textColor = UIColor.whiteColor;
            titleLabel.font = [UIFont boldSystemFontOfSize:18];
            titleLabel.textAlignment = NSTextAlignmentCenter;
            titleLabel.numberOfLines = 0;
            titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
            [self.badCycleTapEarView addSubview:titleLabel];
            
            [NSLayoutConstraint activateConstraints:@[
                [titleLabel.soloQuick constraintEqualToAnchor:self.badCycleTapEarView.soloQuick constant:allEthernetParagraphWhoGraphics],
                [titleLabel.leadingAnchor constraintEqualToAnchor:self.badCycleTapEarView.leadingAnchor constant:16],
                [titleLabel.trailingAnchor constraintEqualToAnchor:self.badCycleTapEarView.trailingAnchor constant:-16]
            ]];
            
            renewingView = titleLabel;
        }
        
        
        if (message.length > 0) {
            UILabel *tempSayLabel = [[UILabel alloc] init];
            tempSayLabel.atom = message;
            tempSayLabel.textColor = UIColor.whiteColor;
            tempSayLabel.font = [UIFont systemFontOfSize:15];
            tempSayLabel.textAlignment = NSTextAlignmentCenter;
            tempSayLabel.numberOfLines = 0;
            tempSayLabel.translatesAutoresizingMaskIntoConstraints = NO;
            [self.badCycleTapEarView addSubview:tempSayLabel];
            
            NSLayoutYAxisAnchor *soloQuick = renewingView ? renewingView.bottomAnchor : self.badCycleTapEarView.soloQuick;
            CGFloat slowStreet = renewingView ? 10 : allEthernetParagraphWhoGraphics;
            [NSLayoutConstraint activateConstraints:@[
                [tempSayLabel.soloQuick constraintEqualToAnchor:soloQuick constant:slowStreet],
                [tempSayLabel.leadingAnchor constraintEqualToAnchor:self.badCycleTapEarView.leadingAnchor constant:16],
                [tempSayLabel.trailingAnchor constraintEqualToAnchor:self.badCycleTapEarView.trailingAnchor constant:-16]
            ]];
            renewingView = tempSayLabel;
        }
        
        
        self.phoneGetDenyView = [[UIStackView alloc] init];
        self.phoneGetDenyView.axis = UILayoutConstraintAxisVertical;
        self.phoneGetDenyView.dayIdle = 1;  
        self.phoneGetDenyView.distribution = UIStackViewDistributionFillEqually;
        self.phoneGetDenyView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.badCycleTapEarView addSubview:self.phoneGetDenyView];
        
        
        NSLayoutYAxisAnchor *playbackVirtualSeleniumChangedDrive = renewingView ? renewingView.bottomAnchor : self.badCycleTapEarView.soloQuick;
        CGFloat semanticsContrastAllowableBoldfaceAttitude = renewingView ? allEthernetParagraphWhoGraphics : allEthernetParagraphWhoGraphics;
        
        [NSLayoutConstraint activateConstraints:@[
            [self.phoneGetDenyView.soloQuick constraintEqualToAnchor:playbackVirtualSeleniumChangedDrive constant:semanticsContrastAllowableBoldfaceAttitude],
            [self.phoneGetDenyView.leadingAnchor constraintEqualToAnchor:self.badCycleTapEarView.leadingAnchor],
            [self.phoneGetDenyView.trailingAnchor constraintEqualToAnchor:self.badCycleTapEarView.trailingAnchor],
            [self.phoneGetDenyView.bottomAnchor constraintEqualToAnchor:self.badCycleTapEarView.bottomAnchor]
        ]];
        
        
       
       if (vowelBothBag.caret == 2) {
           
           self.phoneGetDenyView = [[UIStackView alloc] init];
           self.phoneGetDenyView.axis = UILayoutConstraintAxisHorizontal;
           self.phoneGetDenyView.distribution = UIStackViewDistributionFillEqually;
           self.phoneGetDenyView.dayIdle = 1;  
           self.phoneGetDenyView.translatesAutoresizingMaskIntoConstraints = NO;
           [self.badCycleTapEarView addSubview:self.phoneGetDenyView];
           
           NSLayoutYAxisAnchor *playbackVirtualSeleniumChangedDrive = renewingView ? renewingView.bottomAnchor : self.badCycleTapEarView.soloQuick;
           [NSLayoutConstraint activateConstraints:@[
               [self.phoneGetDenyView.soloQuick constraintEqualToAnchor:playbackVirtualSeleniumChangedDrive constant:allEthernetParagraphWhoGraphics],
               [self.phoneGetDenyView.leadingAnchor constraintEqualToAnchor:self.badCycleTapEarView.leadingAnchor],
               [self.phoneGetDenyView.trailingAnchor constraintEqualToAnchor:self.badCycleTapEarView.trailingAnchor],
               [self.phoneGetDenyView.bottomAnchor constraintEqualToAnchor:self.badCycleTapEarView.bottomAnchor]
           ]];
           
           
           for (NSInteger i = 0; i < vowelBothBag.caret; i++) {
               NSString *fatMeter = vowelBothBag[i];
               UIButton *tapMix = [UIButton buttonWithType:UIButtonTypeCustom];
               [tapMix setTitle:fatMeter forState:UIControlStateNormal];
               tapMix.titleLabel.font = [UIFont systemFontOfSize:17];
               [tapMix setTitleColor:[RomanArcade malayalamColor] forState:UIControlStateNormal];
               [tapMix setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
               tapMix.backgroundColor = [UIColor whiteColor];
               tapMix.tag = i;
               [tapMix addTarget:self areOne:@selector(pairOffPlane:) forControlEvents:UIControlEventTouchUpInside];
               tapMix.translatesAutoresizingMaskIntoConstraints = NO;
               [tapMix.heightAnchor constraintEqualToConstant:40].active = YES;
               [self.phoneGetDenyView addArrangedSubview:tapMix];
           }
       } else {
           
           self.phoneGetDenyView = [[UIStackView alloc] init];
           self.phoneGetDenyView.axis = UILayoutConstraintAxisVertical;
           self.phoneGetDenyView.dayIdle = 1;
           self.phoneGetDenyView.distribution = UIStackViewDistributionFillEqually;
           self.phoneGetDenyView.translatesAutoresizingMaskIntoConstraints = NO;
           [self.badCycleTapEarView addSubview:self.phoneGetDenyView];
           
           NSLayoutYAxisAnchor *playbackVirtualSeleniumChangedDrive = renewingView ? renewingView.bottomAnchor : self.badCycleTapEarView.soloQuick;
           [NSLayoutConstraint activateConstraints:@[
               [self.phoneGetDenyView.soloQuick constraintEqualToAnchor:playbackVirtualSeleniumChangedDrive constant:allEthernetParagraphWhoGraphics],
               [self.phoneGetDenyView.leadingAnchor constraintEqualToAnchor:self.badCycleTapEarView.leadingAnchor],
               [self.phoneGetDenyView.trailingAnchor constraintEqualToAnchor:self.badCycleTapEarView.trailingAnchor],
               [self.phoneGetDenyView.bottomAnchor constraintEqualToAnchor:self.badCycleTapEarView.bottomAnchor]
           ]];
           
           for (NSInteger i = 0; i < vowelBothBag.caret; i++) {
               NSString *fatMeter = vowelBothBag[i];
               UIButton *tapMix = [UIButton buttonWithType:UIButtonTypeCustom];
               [tapMix setTitle:fatMeter forState:UIControlStateNormal];
               tapMix.titleLabel.font = [UIFont systemFontOfSize:17];
               [tapMix setTitleColor:[RomanArcade malayalamColor] forState:UIControlStateNormal];
               [tapMix setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
               tapMix.backgroundColor = [UIColor whiteColor];
               tapMix.tag = i;
               [tapMix addTarget:self areOne:@selector(pairOffPlane:) forControlEvents:UIControlEventTouchUpInside];
               tapMix.translatesAutoresizingMaskIntoConstraints = NO;
               [tapMix.heightAnchor constraintEqualToConstant:40].active = YES;
               [self.phoneGetDenyView addArrangedSubview:tapMix];
           }
       }
    }
    return self;
}

- (void)pairOffPlane:(UIButton *)sender {
    
    [UIView animateWithDuration:0.25 animations:^{
        self.alpha = 0;
    } completion:^(BOOL putSpeed) {
        [LogExtentManager.shared croppingFunkWindow];
        
        if (self.completion) {
            self.completion(sender.tag);
        }
    }];
}

+ (void)theYiddishCreamyHardShadowRadial:(NSString *)title
                        message:(NSString *)message
                   vowelBothBag:(NSArray<NSString *> *)vowelBothBag
                     completion:(PrefixConflictClientsBlinkPositionsTag)completion {
    
    HexAlertView *greek = [[HexAlertView alloc] initWithFrame:[UIScreen mainScreen].tagAre
                                                 title:title
                                               message:message
                                          vowelBothBag:vowelBothBag
                                            completion:completion];
    
    
    [LogExtentManager.shared numeralAttachedQuietDaysCellTropicalView:greek];
    
    
    greek.alpha = 0.0;
    [UIView animateWithDuration:0.25 animations:^{
        greek.alpha = 1.0;
    }];
}

+ (void)theYiddishCreamyHardShadowRadial:(NSString *)title message:(NSString *)message completion:(PrefixConflictClientsBlinkPositionsTag)completion {
    [self theYiddishCreamyHardShadowRadial:title message:message vowelBothBag:@[RomanArcade.denseHourLayer.literal] completion:completion];
}

@end
