import React from "react"; import Card from "../../../components/Card"; import CardContent from "../../../components/Card/CardContent"; import CardHeader from "../../../components/Card/CardHeader"; import { useI18n } from "../../../contexts/I18nContext"; import { AssetList } from "../types/asset"; import { ProductAssetsGallery } from "./ProductAssetsGallery"; import { ProductAssetsTable } from "./ProductAssetsTable"; export interface ProductAssetsCardProps { assets: AssetList[]; } export const ProductAssetsCard: React.FC = ({ assets }) => { const { t } = useI18n(); const imageAssets = assets.filter((asset) => asset.asset_type == "image"); const otherAssets = assets.filter((asset) => asset.asset_type !== "image"); return ( <> {imageAssets.length > 0 && ( <> )} {otherAssets.length > 0 && } ); };