'use strict';
import { and, eq, inArray } from 'drizzle-orm';
import { featureStates, userFeatureStates } from '../../meta/core/resources/enums/feature-enums.js';
import { getDbSchema } from '../../db/db-schema.js';
import { getTableColumn } from '../../db/drizzle-queries.js';
import { schemaNames, columnNames } from '../../db/constants/schema-names.js';

var __defProp=Object['defineProperty'],__name=(_0x4ec617,_0x55d562)=>__defProp(_0x4ec617,'name',{'value':_0x55d562,'configurable':!![]});function getUserFeatureByFeatureCode(_0x189210,_0x451ee7){const _0x171dfb=getDbSchema(),_0x5727d7=_0x171dfb[schemaNames['featureSchema']],_0x59f17e=_0x171dfb[schemaNames['userFeatureSchema']];return and(_0x451ee7?eq(getTableColumn(_0x59f17e,columnNames['userId']),_0x451ee7):void(0xc7e+-0x2d3+-0x9ab),eq(getTableColumn(_0x5727d7,columnNames['code']),_0x189210),eq(getTableColumn(_0x5727d7,columnNames['state']),featureStates['enabled']),eq(getTableColumn(_0x59f17e,columnNames['state']),userFeatureStates['enabled']));}__name(getUserFeatureByFeatureCode,'getUserFeatureByFeatureCode');function getUserFeaturesByFeatureCodes(_0x53b9ff,_0x11a626){const _0x682fc8=getDbSchema(),_0x44172e=_0x682fc8[schemaNames['featureSchema']],_0x1c18bc=_0x682fc8[schemaNames['userFeatureSchema']];return and(_0x11a626?eq(getTableColumn(_0x1c18bc,columnNames['userId']),_0x11a626):void(0xb0b+0x16dc+-0xb*0x315),inArray(getTableColumn(_0x44172e,columnNames['code']),_0x53b9ff),eq(getTableColumn(_0x44172e,columnNames['state']),featureStates['enabled']),eq(getTableColumn(_0x1c18bc,columnNames['state']),userFeatureStates['enabled']));}__name(getUserFeaturesByFeatureCodes,'getUserFeaturesByFeatureCodes');

export { getUserFeatureByFeatureCode, getUserFeaturesByFeatureCodes };
