How can I make a lightbox close itself?

I want to add a fullscreen lightbox that after 3 or 4 seconds it closes itself. Also, if possible, I want to remove any possible way to close the lightbox manually.
Thanks in advance.

You can use setTimeout function to close the lightbox after a few seconds.

import wixWindow from 'wix-window';

$w.onReady(function () {
    setTimeout(() => {
        wixWindow.lightbox.close();
    }, 3000); //3 seconds
});

Thank you.
Also, do you know how can i make it close with an animation? In this case I would like to make the lightbox slide up.