/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ai_feature_manager_exports = {};
__export(ai_feature_manager_exports, {
  AIPluginFeatureManagerImpl: () => AIPluginFeatureManagerImpl,
  EEFeatures: () => EEFeatures
});
module.exports = __toCommonJS(ai_feature_manager_exports);
var import_features = require("../features");
class AIPluginFeatureManagerImpl extends import_features.BasePluginFeatureManager {
  get vectorDatabase() {
    if (!this.features.vectorDatabase) {
      throw this.featureNotSupportedError("vectorDatabase");
    }
    return this.features.vectorDatabase;
  }
  get vectorDatabaseProvider() {
    if (!this.features.vectorDatabaseProvider) {
      throw this.featureNotSupportedError("vectorDatabaseProvider");
    }
    return this.features.vectorDatabaseProvider;
  }
  get vectorStoreProvider() {
    if (!this.features.vectorStoreProvider) {
      throw this.featureNotSupportedError("vectorStoreProvider");
    }
    return this.features.vectorStoreProvider;
  }
  get knowledgeBase() {
    if (!this.features.vectorStoreProvider) {
      throw this.featureNotSupportedError("knowledgeBase");
    }
    return this.features.knowledgeBase;
  }
  featureNotSupportedError(featureName) {
    return new Error(`${featureName} is not supported`);
  }
}
const EEFeatures = {
  vectorDatabase: "vectorDatabase",
  vectorDatabaseProvider: "vectorDatabaseProvider",
  vectorStoreProvider: "vectorStoreProvider",
  knowledgeBase: "knowledgeBase"
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  AIPluginFeatureManagerImpl,
  EEFeatures
});
