import { cn } from '@/lib/utils'
import { getCachedGlobal } from '@/utilities/globals'
import Link from 'next/link'
type IconProps = {
className?: string
}
const baseIconClass = 'h-5 w-5'
const WhatsAppIcon = ({ className }: IconProps) => (
)
const InstagramIcon = ({ className }: IconProps) => (
)
const FacebookIcon = ({ className }: IconProps) => (
)
const YoutubeIcon = ({ className }: IconProps) => (
)
const GlobeIcon = ({ className }: IconProps) => (
)
const icons = {
instagram: InstagramIcon,
facebook: FacebookIcon,
youtube: YoutubeIcon,
whatsapp: WhatsAppIcon,
custom: GlobeIcon,
} as const
const defaultA11yLabels: Record = {
instagram: 'Instagram',
facebook: 'Facebook',
youtube: 'YouTube',
whatsapp: 'WhatsApp',
custom: 'Link externo',
}
type SocialLinksProps = {
ariaLabel: string
className?: string
}
export const SocialLinks = async ({ ariaLabel, className }: SocialLinksProps) => {
const { socialLinks: links } = await getCachedGlobal('site-settings', 2)()
if (!links?.length) return null
return (
)
}