"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.users = void 0;
const dotenv_1 = require("dotenv");
const env_validator_1 = require("./utils/env-validator");
// Загрузка переменных окружения из .env файла
(0, dotenv_1.config)();
// Валидация обязательных переменных окружения при импорте
(0, env_validator_1.validateRequiredEnvVars)();
// Дефолтные значения для AdminConst, ClientConst, BankConst, AgentConst в зависимости от стенда.
const adminConstDefaults = process.env.FEATURE === 'feature6'
    ? { UserID: '684', PersonID: '697', OrganizationID: '1' }
    : { UserID: '858', PersonID: '925', OrganizationID: '1' };
const clientConstDefaults = process.env.FEATURE === 'feature6'
    ? { UserID: '685', PersonID: '698', OrganizationID: '101526' }
    : { UserID: '855', PersonID: '923', OrganizationID: '163336' };
const bankConstDefaults = process.env.FEATURE === 'feature6'
    ? { UserID: '687', PersonID: '700', OrganizationID: '7' }
    : { UserID: '859', PersonID: '926', OrganizationID: '7' };
const agentConstDefaults = process.env.FEATURE === 'feature6'
    ? { UserID: '686', PersonID: '699', OrganizationID: '101528' }
    : { UserID: '856', PersonID: '924', OrganizationID: '163338' };
exports.users = {
    admin: {
        email: process.env.FEATURE === 'feature6' ? (0, env_validator_1.validateEnvVar)('DEMO_ADMIN_EMAIL', process.env.DEMO_ADMIN_EMAIL) : (0, env_validator_1.validateEnvVar)('DEV_ADMIN_EMAIL', process.env.DEV_ADMIN_EMAIL),
        password: process.env.FEATURE === 'feature6' ? (0, env_validator_1.validateEnvVar)('DEMO_ADMIN_PASSWORD', process.env.DEMO_ADMIN_PASSWORD) : (0, env_validator_1.validateEnvVar)('DEV_ADMIN_PASSWORD', process.env.DEV_ADMIN_PASSWORD)
    },
    client: {
        email: (0, env_validator_1.validateEnvVar)('DEV_CLIENT_EMAIL', process.env.DEV_CLIENT_EMAIL),
        password: (0, env_validator_1.validateEnvVar)('DEV_CLIENT_PASSWORD', process.env.DEV_CLIENT_PASSWORD)
    },
    bank: {
        email: (0, env_validator_1.validateEnvVar)('DEV_BANK_EMAIL', process.env.DEV_BANK_EMAIL),
        password: (0, env_validator_1.validateEnvVar)('DEV_BANK_PASSWORD', process.env.DEV_BANK_PASSWORD)
    },
    agent: {
        email: (0, env_validator_1.validateEnvVar)('DEV_AGENT_EMAIL', process.env.DEV_AGENT_EMAIL),
        password: (0, env_validator_1.validateEnvVar)('DEV_AGENT_PASSWORD', process.env.DEV_AGENT_PASSWORD)
    },
    AdminConst: {
        UserID: (0, env_validator_1.getEnvVar)('ADMIN_USER_ID', process.env.ADMIN_USER_ID, adminConstDefaults.UserID),
        PersonID: (0, env_validator_1.getEnvVar)('ADMIN_PERSON_ID', process.env.ADMIN_PERSON_ID, adminConstDefaults.PersonID),
        OrganizationID: (0, env_validator_1.getEnvVar)('ADMIN_ORGANIZATION_ID', process.env.ADMIN_ORGANIZATION_ID, adminConstDefaults.OrganizationID),
        FullName: (0, env_validator_1.getEnvVar)('ADMIN_FULL_NAME', process.env.ADMIN_FULL_NAME, 'Auto Test Admin'),
        OrganizationName: (0, env_validator_1.getEnvVar)('ADMIN_ORGANIZATION_NAME', process.env.ADMIN_ORGANIZATION_NAME, 'ООО «ДОКПЛАТ»')
    },
    ClientConst: {
        UserID: (0, env_validator_1.getEnvVar)('CLIENT_USER_ID', process.env.CLIENT_USER_ID, clientConstDefaults.UserID),
        PersonID: (0, env_validator_1.getEnvVar)('CLIENT_PERSON_ID', process.env.CLIENT_PERSON_ID, clientConstDefaults.PersonID),
        OrganizationID: (0, env_validator_1.getEnvVar)('CLIENT_ORGANIZATION_ID', process.env.CLIENT_ORGANIZATION_ID, clientConstDefaults.OrganizationID),
        FullName: (0, env_validator_1.getEnvVar)('CLIENT_FULL_NAME', process.env.CLIENT_FULL_NAME, 'Auto Test Client'),
        OrganizationName: (0, env_validator_1.getEnvVar)('CLIENT_ORGANIZATION_NAME', process.env.CLIENT_ORGANIZATION_NAME, 'ООО "Бочка"')
    },
    AgentConst: {
        UserID: (0, env_validator_1.getEnvVar)('AGENT_USER_ID', process.env.AGENT_USER_ID, agentConstDefaults.UserID),
        PersonID: (0, env_validator_1.getEnvVar)('AGENT_PERSON_ID', process.env.AGENT_PERSON_ID, agentConstDefaults.PersonID),
        OrganizationID: (0, env_validator_1.getEnvVar)('AGENT_ORGANIZATION_ID', process.env.AGENT_ORGANIZATION_ID, agentConstDefaults.OrganizationID),
        FullName: (0, env_validator_1.getEnvVar)('AGENT_FULL_NAME', process.env.AGENT_FULL_NAME, 'Auto Test Agent'),
        OrganizationName: (0, env_validator_1.getEnvVar)('AGENT_ORGANIZATION_NAME', process.env.AGENT_ORGANIZATION_NAME, 'ООО "Трубо-Пласт"')
    },
    BankConst: {
        UserID: (0, env_validator_1.getEnvVar)('BANK_USER_ID', process.env.BANK_USER_ID, bankConstDefaults.UserID),
        PersonID: (0, env_validator_1.getEnvVar)('BANK_PERSON_ID', process.env.BANK_PERSON_ID, bankConstDefaults.PersonID),
        OrganizationID: (0, env_validator_1.getEnvVar)('BANK_ORGANIZATION_ID', process.env.BANK_ORGANIZATION_ID, bankConstDefaults.OrganizationID),
        FullName: (0, env_validator_1.getEnvVar)('BANK_FULL_NAME', process.env.BANK_FULL_NAME, 'Auto Test Bank'),
        OrganizationName: (0, env_validator_1.getEnvVar)('BANK_ORGANIZATION_NAME', process.env.BANK_ORGANIZATION_NAME, 'ООО "СМП ФАКТОРИНГ"')
    }
};
