import { getCategoryAsset } from "../../../../../services/factoryBuilder/asset/assets/getCategoryAsset";
import { fetchAssets } from "../../../../../services/marketplace/fetchAssets";

export const fetchCategoryAssets = async (category: string): Promise<AssetProp[]> => {
    if (category === "Decals") return []; // handled separately
    try {
        const res = await getCategoryAsset(category);
        return res;
    } catch (err) {
        console.error("Failed to fetch category assets", err);
        return [];
    }
};

export const fetchAllAssets = async (): Promise<AssetProp[]> => {
    try {
        return await fetchAssets();
    } catch (err) {
        console.error("Failed to fetch all assets", err);
        return [];
    }
};
