import {useAp2iRequestService} from "~/composables/data/useAp2iRequestService";
import ImageManager from "~/services/data/imageManager";

let imageManager:ImageManager | null = null

export const useImageManager = () => {
    //Avoid memory leak
    if (imageManager === null) {
        const { apiRequestService } = useAp2iRequestService()
        imageManager = new ImageManager(apiRequestService)
    }

    return { imageManager: imageManager }
}
