import { storeMetadataOnTheGraph } from "../offers/storage";
export async function storeMetadataItems(args) {
    await Promise.all(args.createOffersArgs.map(async (offerToCreate) => {
        const offerMetadata = await args.metadataStorage?.getMetadata(offerToCreate.metadataUri);
        if (offerMetadata?.type === "BUNDLE") {
            await Promise.all(offerMetadata.items.map((item) => {
                return storeMetadataOnTheGraph({
                    metadataUriOrHash: item.url,
                    metadataStorage: args.metadataStorage,
                    theGraphStorage: args.theGraphStorage
                });
            }));
        }
    }));
}
//# sourceMappingURL=storeMetadataItems.js.map