import { buttonGroupVariants, type ButtonGroupVariants } from "./variants.ts";
import { cn } from "#lib/utils.ts";

export interface Input extends Marko.Input<"div">, ButtonGroupVariants {}

<const/{ orientation, class: className, content, ...rest }=input/>

<div
  role="group"
  data-slot="button-group"
  data-orientation=(orientation ?? "horizontal")
  ...rest
  class=cn(buttonGroupVariants({ orientation }), className)
>
  <${content}/>
</div>
