mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 09:19:43 +00:00
15 lines
518 B
TypeScript
15 lines
518 B
TypeScript
import { isCloud } from '@/platform/distribution/types'
|
|
|
|
import type { IAssetsProvider } from './IAssetsProvider'
|
|
import { useAssetsApi } from './useAssetsApi'
|
|
import { useInternalFilesApi } from './useInternalFilesApi'
|
|
|
|
/**
|
|
* Factory function that returns the appropriate media assets implementation
|
|
* based on the current distribution (cloud vs internal)
|
|
* @returns IAssetsProvider implementation
|
|
*/
|
|
export function useMediaAssets(): IAssetsProvider {
|
|
return isCloud ? useAssetsApi() : useInternalFilesApi()
|
|
}
|