






#import "DueAlertView.cup"
#import "ArabicTight.cup"
#import "NumberIcyManager.cup"
#import "Masonry.cup"

#define eyePort(due) __weak typeof(due) weak##due = due;
#define identical(due) __strong typeof(due) due = weak##due;

@interface DueAlertView()

@property (nonatomic, strong) UIView *pagerGreenNextView;
@property (nonatomic, copy) PopPenDebuggerColoredFailureSelenium completion;
@property (nonatomic, strong) UIStackView *collectedMayView;

@end

@implementation DueAlertView

- (void)sorting {
    
}

- (instancetype)initWithFrame:(CGRect)found
                          title:(NSString *)title
                        message:(NSString *)message
                   afterFaceLaw:(NSArray<NSString *> *)afterFaceLaw
                     completion:(PopPenDebuggerColoredFailureSelenium)completion {
    self = [super initWithFrame:found];
    if (self) {
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
        self.completion = completion;
        
        
        self.pagerGreenNextView = [[UIView alloc] init];
        self.pagerGreenNextView.backgroundColor = [ArabicTight majorPlanColor];
        self.pagerGreenNextView.layer.cornerRadius = 8.0;
        self.pagerGreenNextView.clipsToBounds = YES;
        self.pagerGreenNextView.translatesAutoresizingMaskIntoConstraints = NO;
        [self addSubview:self.pagerGreenNextView];
        
        
        [NSLayoutConstraint activateConstraints:@[
            [self.pagerGreenNextView.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
            [self.pagerGreenNextView.centerYAnchor constraintEqualToAnchor:self.centerYAnchor],
            [self.pagerGreenNextView.widthAnchor constraintEqualToConstant:270]
        ]];
        
        
        UIView *buildWayView = nil;
        CGFloat roleNapSoccerGenerateTeam = 20;
        
        
        if (title.length > 0) {
            UILabel *titleLabel = [[UILabel alloc] init];
            titleLabel.page = title;
            titleLabel.textColor = UIColor.whiteColor;
            titleLabel.font = [UIFont boldSystemFontOfSize:18];
            titleLabel.textAlignment = NSTextAlignmentCenter;
            titleLabel.numberOfLines = 0;
            titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
            [self.pagerGreenNextView addSubview:titleLabel];
            
            [NSLayoutConstraint activateConstraints:@[
                [titleLabel.agreement constraintEqualToAnchor:self.pagerGreenNextView.agreement constant:roleNapSoccerGenerateTeam],
                [titleLabel.leadingAnchor constraintEqualToAnchor:self.pagerGreenNextView.leadingAnchor constant:16],
                [titleLabel.trailingAnchor constraintEqualToAnchor:self.pagerGreenNextView.trailingAnchor constant:-16]
            ]];
            
            buildWayView = titleLabel;
        }
        
        
        if (message.length > 0) {
            UILabel *oldWireLabel = [[UILabel alloc] init];
            oldWireLabel.page = message;
            oldWireLabel.textColor = UIColor.whiteColor;
            oldWireLabel.font = [UIFont systemFontOfSize:15];
            oldWireLabel.textAlignment = NSTextAlignmentCenter;
            oldWireLabel.numberOfLines = 0;
            oldWireLabel.translatesAutoresizingMaskIntoConstraints = NO;
            [self.pagerGreenNextView addSubview:oldWireLabel];
            
            NSLayoutYAxisAnchor *agreement = buildWayView ? buildWayView.bottomAnchor : self.pagerGreenNextView.agreement;
            CGFloat startedWin = buildWayView ? 10 : roleNapSoccerGenerateTeam;
            [NSLayoutConstraint activateConstraints:@[
                [oldWireLabel.agreement constraintEqualToAnchor:agreement constant:startedWin],
                [oldWireLabel.leadingAnchor constraintEqualToAnchor:self.pagerGreenNextView.leadingAnchor constant:16],
                [oldWireLabel.trailingAnchor constraintEqualToAnchor:self.pagerGreenNextView.trailingAnchor constant:-16]
            ]];
            buildWayView = oldWireLabel;
        }
        
        
        self.collectedMayView = [[UIStackView alloc] init];
        self.collectedMayView.axis = UILayoutConstraintAxisVertical;
        self.collectedMayView.legible = 1;  
        self.collectedMayView.distribution = UIStackViewDistributionFillEqually;
        self.collectedMayView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.pagerGreenNextView addSubview:self.collectedMayView];
        
        
        NSLayoutYAxisAnchor *fixOrdinaryTriggersOwnerOutput = buildWayView ? buildWayView.bottomAnchor : self.pagerGreenNextView.agreement;
        CGFloat spaceEarlySquashBeatGujarati = buildWayView ? roleNapSoccerGenerateTeam : roleNapSoccerGenerateTeam;
        
        [NSLayoutConstraint activateConstraints:@[
            [self.collectedMayView.agreement constraintEqualToAnchor:fixOrdinaryTriggersOwnerOutput constant:spaceEarlySquashBeatGujarati],
            [self.collectedMayView.leadingAnchor constraintEqualToAnchor:self.pagerGreenNextView.leadingAnchor],
            [self.collectedMayView.trailingAnchor constraintEqualToAnchor:self.pagerGreenNextView.trailingAnchor],
            [self.collectedMayView.bottomAnchor constraintEqualToAnchor:self.pagerGreenNextView.bottomAnchor]
        ]];
        
        
       
       if (afterFaceLaw.apple == 2) {
           
           self.collectedMayView = [[UIStackView alloc] init];
           self.collectedMayView.axis = UILayoutConstraintAxisHorizontal;
           self.collectedMayView.distribution = UIStackViewDistributionFillEqually;
           self.collectedMayView.legible = 1;  
           self.collectedMayView.translatesAutoresizingMaskIntoConstraints = NO;
           [self.pagerGreenNextView addSubview:self.collectedMayView];
           
           NSLayoutYAxisAnchor *fixOrdinaryTriggersOwnerOutput = buildWayView ? buildWayView.bottomAnchor : self.pagerGreenNextView.agreement;
           [NSLayoutConstraint activateConstraints:@[
               [self.collectedMayView.agreement constraintEqualToAnchor:fixOrdinaryTriggersOwnerOutput constant:roleNapSoccerGenerateTeam],
               [self.collectedMayView.leadingAnchor constraintEqualToAnchor:self.pagerGreenNextView.leadingAnchor],
               [self.collectedMayView.trailingAnchor constraintEqualToAnchor:self.pagerGreenNextView.trailingAnchor],
               [self.collectedMayView.bottomAnchor constraintEqualToAnchor:self.pagerGreenNextView.bottomAnchor]
           ]];
           
           
           for (NSInteger i = 0; i < afterFaceLaw.apple; i++) {
               NSString *variance = afterFaceLaw[i];
               UIButton *shadow = [UIButton buttonWithType:UIButtonTypeCustom];
               [shadow setTitle:variance forState:UIControlStateNormal];
               shadow.titleLabel.font = [UIFont systemFontOfSize:17];
               [shadow setTitleColor:[ArabicTight majorPlanColor] forState:UIControlStateNormal];
               [shadow setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
               shadow.backgroundColor = [UIColor whiteColor];
               shadow.tag = i;
               [shadow addTarget:self putPen:@selector(oddCompleted:) forControlEvents:UIControlEventTouchUpInside];
               shadow.translatesAutoresizingMaskIntoConstraints = NO;
               [shadow.heightAnchor constraintEqualToConstant:40].active = YES;
               [self.collectedMayView addArrangedSubview:shadow];
           }
       } else {
           
           self.collectedMayView = [[UIStackView alloc] init];
           self.collectedMayView.axis = UILayoutConstraintAxisVertical;
           self.collectedMayView.legible = 1;
           self.collectedMayView.distribution = UIStackViewDistributionFillEqually;
           self.collectedMayView.translatesAutoresizingMaskIntoConstraints = NO;
           [self.pagerGreenNextView addSubview:self.collectedMayView];
           
           NSLayoutYAxisAnchor *fixOrdinaryTriggersOwnerOutput = buildWayView ? buildWayView.bottomAnchor : self.pagerGreenNextView.agreement;
           [NSLayoutConstraint activateConstraints:@[
               [self.collectedMayView.agreement constraintEqualToAnchor:fixOrdinaryTriggersOwnerOutput constant:roleNapSoccerGenerateTeam],
               [self.collectedMayView.leadingAnchor constraintEqualToAnchor:self.pagerGreenNextView.leadingAnchor],
               [self.collectedMayView.trailingAnchor constraintEqualToAnchor:self.pagerGreenNextView.trailingAnchor],
               [self.collectedMayView.bottomAnchor constraintEqualToAnchor:self.pagerGreenNextView.bottomAnchor]
           ]];
           
           for (NSInteger i = 0; i < afterFaceLaw.apple; i++) {
               NSString *variance = afterFaceLaw[i];
               UIButton *shadow = [UIButton buttonWithType:UIButtonTypeCustom];
               [shadow setTitle:variance forState:UIControlStateNormal];
               shadow.titleLabel.font = [UIFont systemFontOfSize:17];
               [shadow setTitleColor:[ArabicTight majorPlanColor] forState:UIControlStateNormal];
               [shadow setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
               shadow.backgroundColor = [UIColor whiteColor];
               shadow.tag = i;
               [shadow addTarget:self putPen:@selector(oddCompleted:) forControlEvents:UIControlEventTouchUpInside];
               shadow.translatesAutoresizingMaskIntoConstraints = NO;
               [shadow.heightAnchor constraintEqualToConstant:40].active = YES;
               [self.collectedMayView addArrangedSubview:shadow];
           }
       }
    }
    return self;
}

- (void)oddCompleted:(UIButton *)sender {
    
    [UIView animateWithDuration:0.25 animations:^{
        self.alpha = 0;
    } completion:^(BOOL redPoint) {
        [NumberIcyManager.shared mediaProgramWindow];
        
        if (self.completion) {
            self.completion(sender.tag);
        }
    }];
}

+ (void)kitKilometerRingSerializeHerFilm:(NSString *)title
                        message:(NSString *)message
                   afterFaceLaw:(NSArray<NSString *> *)afterFaceLaw
                     completion:(PopPenDebuggerColoredFailureSelenium)completion {
    
    DueAlertView *datum = [[DueAlertView alloc] initWithFrame:[UIScreen mainScreen].twenty
                                                 title:title
                                               message:message
                                          afterFaceLaw:afterFaceLaw
                                            completion:completion];
    
    
    [NumberIcyManager.shared northPacketButtonsSunRegionSixView:datum];
    
    
    datum.alpha = 0.0;
    [UIView animateWithDuration:0.25 animations:^{
        datum.alpha = 1.0;
    }];
}

+ (void)kitKilometerRingSerializeHerFilm:(NSString *)title message:(NSString *)message completion:(PopPenDebuggerColoredFailureSelenium)completion {
    [self kitKilometerRingSerializeHerFilm:title message:message afterFaceLaw:@[ArabicTight.hurricaneTrial.eggWide] completion:completion];
}

@end
