import { UMB_EXTENSION_ENTITY_TYPE } from '../../entity.js';
import { umbExtensionsRegistry } from '../../../extension-registry/index.js';
export class UmbExtensionItemDataSource {
    async getItems(uniques) {
        const extensions = umbExtensionsRegistry.getAllExtensions();
        const data = extensions
            .filter((manifest) => uniques.includes(manifest.alias))
            .map((manifest) => ({
            entityType: UMB_EXTENSION_ENTITY_TYPE,
            unique: manifest.alias,
            name: manifest.name,
            description: manifest.alias,
            icon: 'icon-plugin',
            manifest: {
                type: manifest.type,
                alias: manifest.alias,
                name: manifest.name,
                weight: manifest.weight,
                kind: manifest.kind,
            },
        }));
        return { data };
    }
}
