"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SocialNetworkEmailsValidator = void 0;
const express_validator_1 = require("express-validator");
const validator_handle_1 = require("../../utils/handlers/validator.handle");
const abstract_validator_1 = require("../abstract.validator");
class SocialNetworkEmailsValidator extends abstract_validator_1.AbstractValidator {
    constructor() {
        super();
    }
    sendEmail() {
        return [
            (0, express_validator_1.check)("list").exists().isArray(),
            (0, express_validator_1.check)("list.*.subject").exists().isString(),
            (0, express_validator_1.check)("list.*.html").exists().isString(),
            (0, express_validator_1.check)("list.*.email").exists().isString(),
            (0, express_validator_1.check)("list.*.data").exists().isObject(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendVerification() {
        return [
            (0, express_validator_1.check)("email").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    verify() {
        return [
            (0, express_validator_1.check)("email").exists().isString(),
            (0, express_validator_1.check)("code").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    createItem() {
        return [
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    updateItem() {
        return [
            (0, express_validator_1.check)("_id").exists().isMongoId(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
}
exports.SocialNetworkEmailsValidator = SocialNetworkEmailsValidator;
