import type { Language } from '../../runtime'; import { AsyncData } from '../../runtime'; import type { IModelTag } from '../../types'; export const useFetchTopChipsModels = async (apiMethod: (...args: any[]) => Promise, cacheId: string) => { const lang = useLang() as Language; const key = AsyncData.TopChipsModels; const stateKey = computed(() => `data-${key}-${cacheId}-${lang}`); const { data: topChipsModels, refresh, status } = await useAsyncData( stateKey.value, () => useApiFetcher( stateKey.value, apiMethod, 20, 0, lang, cacheId, )(), ); return { topChipsModels, refresh, status }; };