// Path: src/main/java/com/oskopek/studyguide/persistence/ProgressObservable.java
// public interface ProgressObservable {
// 
//     /**
//      * The double property that is bound to a UI element showing progress.
//      * Expects values either equal to {@code -1d} or in the range {@code [0, 1]}.
//      *
//      * @return the double property
//      */
//     DoubleProperty progressProperty();
// 
// }


import com.oskopek.studyguide.persistence.ProgressObservable;
import javafx.event.Event;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
package com.oskopek.studyguide.view;


/**
 * Utility class for creating and displaying blocking progress pop-ups.
 */
public final class ProgressCreator {

    /**
     * Private default constructor to forbid instantiation.
     */
    private ProgressCreator() {
        // intentionally empty
    }

    /**
     * A util method to display a blocking progress pop-up with the given parameters.
     *
     * @param progressObservable the observable object that gives us the progress
     * @param message the message to display while waiting
     * @return the stage of the opened dialog with the progress bar
     */
// Path: src/main/java/com/oskopek/studyguide/persistence/ProgressObservable.java
// public interface ProgressObservable {
// 
//     /**
//      * The double property that is bound to a UI element showing progress.
//      * Expects values either equal to {@code -1d} or in the range {@code [0, 1]}.
//      *
//      * @return the double property
//      */
//     DoubleProperty progressProperty();
// 
// }


// Path: src/main/java/com/oskopek/studyguide/view/ProgressCreator.java
import com.oskopek.studyguide.persistence.ProgressObservable;
import javafx.event.Event;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

package com.oskopek.studyguide.view;


/**
 * Utility class for creating and displaying blocking progress pop-ups.
 */
public final class ProgressCreator {

    /**
     * Private default constructor to forbid instantiation.
     */
    private ProgressCreator() {
        // intentionally empty
    }

    /**
     * A util method to display a blocking progress pop-up with the given parameters.
     *
     * @param progressObservable the observable object that gives us the progress
     * @param message the message to display while waiting
     * @return the stage of the opened dialog with the progress bar
     */
    public static Stage showProgress(ProgressObservable progressObservable, String message) {