Repeater Buttons Linking to different lightboxes

Hi I did not understand why you need a lightbox if you have more information for each item you create a dynamic page for each page with information extension that is in a database.
If you still want to open lightbox you can maybe save the name of the lightbox in the database and then open it. For example so maybe it will work for you

import wixWindow from 'wix-window';
export function Button_click(event,$item) {
let MyLightBox =  $item('#dataset1').getCurrentItem().MyLightBox
  wixWindow.openLightbox(MyLightBox)
}