import React from "react";

export function Badge({ variant = "default", size = "default", className = "", children, render, ...props }) {
  const cls = ["o-badge", "o-badge--" + variant, size !== "default" ? "o-badge--" + size : "", className].filter(Boolean).join(" ");
  const shared = { className: cls, "data-slot": "badge", children, ...props };
  if (render) return React.cloneElement(render, shared);
  return <span {...shared} />;
}
