'use strict';
import { getStringEnvSetting, getRequiredStringEnvSetting } from '../../fd-toolbox/infra/env-functions.js';
import { getDotenvConfig } from '../../fd-toolbox/infra/env-config.js';
import { toolboxEnvSettingKeys } from '../../fd-toolbox/infra/toolbox-env-setting-keys.js';
import { dbTypes } from '../../base-repo/constants/tools-constants.js';
import { drizzleDialects } from './constants/db-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x31dba9,_0x588159)=>__defProp(_0x31dba9,'name',{'value':_0x588159,'configurable':!![]});getDotenvConfig();function getDbType(){const _0x5061da=getStringEnvSetting(toolboxEnvSettingKeys['dbType']);let _0x5aef6f=dbTypes['postgres'];if(_0x5061da){const _0x33acdf=_0x5061da['toLowerCase']();isDbTypeKey(_0x33acdf)&&(_0x5aef6f=dbTypes[_0x33acdf]);}return _0x5aef6f;}__name(getDbType,'getDbType');function getDrizzleDialect(){const _0x282ecb=getDbType();let _0x5311a6=drizzleDialects['postgresql'];return _0x282ecb===dbTypes['sqlite']&&(_0x5311a6=drizzleDialects['sqlite']),_0x5311a6;}__name(getDrizzleDialect,'getDrizzleDialect');function getDbConnectionString(){return getRequiredStringEnvSetting(toolboxEnvSettingKeys['databaseConnectionString']);}__name(getDbConnectionString,'getDbConnectionString');function isDbTypeKey(_0x147511){return _0x147511 in dbTypes;}__name(isDbTypeKey,'isDbTypeKey');

export { getDbConnectionString, getDbType, getDrizzleDialect };
