"use client"
import {
  LayoutComponentDefinition,
  LayoutContext,
} from "@vibentec/component-map"
import { DefaultCtaBanner } from "./default-cta"

export function VtCtaBanner({
  nodes,
  context,
}: {
  nodes: LayoutComponentDefinition
  context: LayoutContext
}) {
  const props = nodes.config ?? {}
  const variant = props.variant ?? "default"

  const variants: Record<string, any> = {
    default: DefaultCtaBanner,
  }

  const Component = variants[variant] || DefaultCtaBanner

  return <Component nodes={nodes} context={context} />
}
