import React from 'react' const CONTENT_TYPE_STYLES = { wallpapers: { badge: 'from-cyan-400/90 to-sky-500/90', overlay: 'from-sky-950/10 via-slate-950/12 to-slate-950/92', glow: 'group-hover:shadow-[0_0_28px_rgba(34,211,238,0.18)]', }, skins: { badge: 'from-orange-400/90 to-amber-500/90', overlay: 'from-orange-950/10 via-slate-950/12 to-slate-950/92', glow: 'group-hover:shadow-[0_0_28px_rgba(251,146,60,0.18)]', }, photography: { badge: 'from-emerald-400/90 to-teal-500/90', overlay: 'from-emerald-950/10 via-slate-950/12 to-slate-950/92', glow: 'group-hover:shadow-[0_0_28px_rgba(16,185,129,0.18)]', }, other: { badge: 'from-fuchsia-400/90 to-rose-500/90', overlay: 'from-rose-950/10 via-slate-950/12 to-slate-950/92', glow: 'group-hover:shadow-[0_0_28px_rgba(244,114,182,0.18)]', }, default: { badge: 'from-cyan-400/90 to-orange-400/90', overlay: 'from-slate-900/10 via-slate-950/12 to-slate-950/92', glow: 'group-hover:shadow-[0_0_28px_rgba(125,211,252,0.16)]', }, } const countFormatter = new Intl.NumberFormat() function formatArtworkCount(count) { return `${countFormatter.format(Number(count || 0))} artworks` } export default function CategoryCard({ category, index = 0 }) { const contentTypeSlug = category?.content_type?.slug || 'default' const contentTypeName = category?.content_type?.name || 'Category' const styles = CONTENT_TYPE_STYLES[contentTypeSlug] || CONTENT_TYPE_STYLES.default return (
{`Cover
{contentTypeName} {formatArtworkCount(category?.artwork_count)}

{category?.name}

Explore {category?.name} across wallpapers, skins, themes, and digital art collections.

) }