interface DifficultyBadgeProps {
  level: "einsteiger" | "fortgeschritten" | "experte";
}

const config = {
  einsteiger: {
    label: "Einsteiger",
    className: "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400",
  },
  fortgeschritten: {
    label: "Fortgeschritten",
    className: "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400",
  },
  experte: {
    label: "Experte",
    className: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",
  },
};

export const DifficultyBadge = ({ level }: DifficultyBadgeProps) => {
  const { label, className } = config[level];
  return (
    <span className={`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${className}`}>
      {label}
    </span>
  );
};
