"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
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: zod_1.z.string().optional().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(),
    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: requiredNumber('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_1.requiredNumber)('adminId'),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.adminChangeStatusSchema = zod_1.z.object({
    status: (0, validation_2.requiredString)('status'),
    adminId: (0, validation_1.requiredNumber)('adminId'),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.adminTogglePermissionSchema = zod_1.z.object({
    permission: (0, validation_2.requiredString)('permission'),
    adminId: (0, validation_1.requiredNumber)('adminId'),
    observacao: zod_1.z.string().trim().optional(),
    userId: (0, validation_1.requiredNumber)('userId'),
});
