import { rOnLoad } from "./helpers";
class BalFloatingUiInternal {
    constructor() {
        this.load = async () => {
            return new Promise((resolve, reject) => {
                if (this.lib) {
                    return resolve(this.lib);
                }
                else {
                    rOnLoad(async () => {
                        import(/* @vite-ignore */ '@floating-ui/dom')
                            .then(module => {
                            this.lib = module;
                            resolve(this.lib);
                        })
                            .catch(reject);
                    });
                }
            });
        };
    }
}
export const balFloatingUi = new BalFloatingUiInternal();
