"use client";

import { BarChart } from "@tremor/react";

interface AbortReasonsBarChartProps {
	// biome-ignore lint/suspicious/noExplicitAny: temporary fix
	data: any[];
}

export function AbortReasonsBarChart(props: AbortReasonsBarChartProps) {
	const { data } = props;

	const dataFormatter = (number: number) => Intl.NumberFormat("de-DE").format(number).toString();

	return (
		<BarChart
			className="mt-6"
			data={data}
			index="name"
			categories={["Anzahl"]}
			colors={["blue"]}
			valueFormatter={dataFormatter}
			yAxisWidth={48}
		/>
	);
}
