'use client' import { useTheme } from 'next-themes' import Image from 'next/image' import * as React from 'react' import { cn } from 'ui' interface Props { title: string icon?: string | React.ReactNode children?: React.ReactNode header?: string background?: boolean className?: string logo?: string logoInverse?: string hasLightIcon?: boolean showLink?: boolean showIconBg?: boolean } export const GlassPanel = ({ title, icon, children, header, background = true, logo, logoInverse, hasLightIcon, showLink = false, showIconBg = false, className, }: Props) => { const { resolvedTheme } = useTheme() const showLogoInverse = logoInverse && resolvedTheme?.includes('dark') const showLogo = !showLogoInverse && logo const IconBackground: React.FC = (props) => (
{props.children}
) const LogoComponent = ({ logoImage, className }: { logoImage: string; className?: string }) => (
{title}
) return (
{showLogoInverse && } {showLogo && } {header && ( )} {/*
*/}
{icon && typeof icon === 'string' ? ( {title} ) : ( icon && {icon} )}

{title}

{children && {children}} {showLink && Learn more}
) }