"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.userByEmailSchema = exports.adminTogglePermissionSchema = exports.adminChangeStatusSchema = exports.adminChangeFuncaoSchema = exports.extendAdminRegisterSchema = exports.adminRegisterSchema = void 0;
const validation_1 = require("./../../util/validation");
const zod_1 = require("zod");
const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
const validation_2 = require("../../util/validation");
(0, zod_to_openapi_1.extendZodWithOpenApi)(zod_1.z);
exports.adminRegisterSchema = zod_1.z.object({
    nome: (0, validation_2.requiredString)('nome').openapi({ example: 'Pedro Augusto' }),
    email: (0, validation_2.requiredString)('email').openapi({ example: 'pedro@email.domain' }),
    tel1: zod_1.z.string().trim().optional().openapi({ example: '939404039' }),
    tel2: zod_1.z.string().trim().optional().openapi({ example: '948475847' }),
    genero: (0, validation_2.requiredString)('genero').openapi({ example: 'M' }),
    provincia: zod_1.z.string().trim().optional().openapi({ example: 'Luanda' }),
    municipio: zod_1.z.string().trim().optional().openapi({ example: 'Belas' }),
    bairro: zod_1.z.string().trim().optional(),
    rua: zod_1.z.string().trim().optional(),
    espacoDesportivoId: zod_1.z.string().trim().optional().openapi({ example: '6970ad7ceba89216e242b2fd' }),
    numeroBI: zod_1.z.string().trim().optional().openapi({ example: '004582976LA023' }),
    perfil: (0, validation_2.requiredString)('perfil').openapi({ example: 'Operador' }),
    permissions: zod_1.z.string().optional(),
    userId: (0, validation_2.requiredString)('userId').openapi({ example: '6964ea76efd9758ae04766c7' }),
});
exports.extendAdminRegisterSchema = exports.adminRegisterSchema.extend({
    foto: (0, validation_1.fileSchema)('foto').optional()
});
exports.adminChangeFuncaoSchema = zod_1.z.object({
    funcao: (0, validation_2.requiredString)('funcao'),
    adminId: (0, validation_2.requiredString)('adminId'),
    userId: (0, validation_2.requiredString)('userId'),
});
exports.adminChangeStatusSchema = zod_1.z.object({
    status: (0, validation_2.requiredString)('status'),
    adminId: (0, validation_2.requiredString)('adminId'),
    userId: (0, validation_2.requiredString)('userId'),
});
exports.adminTogglePermissionSchema = zod_1.z.object({
    permission: (0, validation_2.requiredString)('permission'),
    adminId: (0, validation_2.requiredString)('adminId'),
    observacao: zod_1.z.string().trim().optional(),
    userId: (0, validation_2.requiredString)('userId'),
});
exports.userByEmailSchema = zod_1.z.object({
    email: (0, validation_2.requiredString)('email', true),
});
