"use client"; import type { ComponentRenderProps } from "./types"; import { baseClass, getCustomClass } from "./utils"; interface DataPoint { label: string; value: number; } export function BarGraph({ element }: ComponentRenderProps) { const { props } = element; const customClass = getCustomClass(props); const data = (props.data as DataPoint[]) || []; const title = props.title as string | undefined; const maxValue = Math.max(...data.map((d) => d.value), 1); return (