import EntityManager from "~/services/data/entityManager"; import {useMaestroRequestService} from "~/composables/data/useMaestroRequestService"; import {useRepo} from "pinia-orm"; let entityManager: EntityManager | null = null export const useEntityManager = () => { if (entityManager === null) { const { apiRequestService } = useMaestroRequestService() const getRepo = useRepo entityManager = new EntityManager(apiRequestService, getRepo) } return { em: entityManager } }