'use strict';
import { apiOkResponse } from '../../../meta/server/web/responses.js';
import { routes } from '../../../../fd-toolbox/routing/routes.js';
import { apiBadRequestError } from '../../../../fd-toolbox/server/web/errors.js';
import { isFeatureEnabled } from '../../features/features.js';
import { metaErrorMessages } from '../../../meta/constants/meta-error-messages-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x3db60,_0x5bdfd4)=>__defProp(_0x3db60,'name',{'value':_0x5bdfd4,'configurable':!![]});async function userfeatureIsenabledGetRoute(_0x3fcee1){const _0x2aca6d=new URL(_0x3fcee1['url']),_0x1dad22=_0x2aca6d['searchParams']['get'](routes['featureCode']),_0x3b17e8=_0x2aca6d['searchParams']['get'](routes['userId']);if(!_0x1dad22||!_0x3b17e8)throw apiBadRequestError(metaErrorMessages['missingFeatureCodeOrUserId']);const _0x22185f=await isFeatureEnabled(_0x1dad22,_0x3b17e8);return apiOkResponse({'isEnabled':_0x22185f});}__name(userfeatureIsenabledGetRoute,'userfeatureIsenabledGetRoute');

export { userfeatureIsenabledGetRoute };
