import { clx } from "@medusajs/ui"
import {
  LayoutComponentDefinition,
  LayoutContext,
} from "@vibentec/component-map"
export interface VtImageConfig {
  src: string
  alt: string
  className?: string,
  objectFit?: string,
}
export default function VtLogo({
  nodes,
  context,
}: {
  nodes: LayoutComponentDefinition
  context: LayoutContext
}) {
  const props = (nodes.config as VtImageConfig) ?? {}
  return (
    <div className={clx("relative", props.className)}>
      <img src={props.src} alt={props.alt} className={clx("w-full h-full", props.objectFit)} />
    </div>
  )
}
