import { PluginConstructor } from "../shared/src/plugin.js";
import { PluginManifest, ResourceFieldEntry, ResourcePermission, ResourceType } from "./types.js";

//#region src/registry/manifest-loader.d.ts

/**
 * Loads and validates the manifest from a plugin constructor.
 * Normalizes string type/permission to strict ResourceType/ResourcePermission.
 *
 * @param plugin - The plugin constructor class
 * @returns The validated, normalized plugin manifest
 * @throws {ConfigurationError} If the manifest is missing, invalid, or has invalid resource type/permission
 */
declare function getPluginManifest(plugin: PluginConstructor): PluginManifest;
/**
 * Gets the resource requirements from a plugin's manifest.
 *
 * Combines required and optional resources into a single array with the
 * `required` flag set appropriately.
 *
 * @param plugin - The plugin constructor class
 * @returns Combined array of required and optional resources
 * @throws {ConfigurationError} If the plugin manifest is missing or invalid
 *
 * @example
 * ```typescript
 * const resources = getResourceRequirements(AnalyticsPlugin);
 * for (const resource of resources) {
 *   console.log(`${resource.type}: ${resource.description} (required: ${resource.required})`);
 * }
 * ```
 */
declare function getResourceRequirements(plugin: PluginConstructor): {
  required: boolean;
  type: ResourceType;
  alias: string;
  resourceKey: string;
  description: string;
  permission: ResourcePermission;
  fields: Record<string, ResourceFieldEntry>;
}[];
//#endregion
export { getPluginManifest, getResourceRequirements };
//# sourceMappingURL=manifest-loader.d.ts.map