"use client"

import { cn } from "@mdxui/primitives/lib/utils"
import { Button } from "@mdxui/primitives/button"
import { MdOutlineBugReport } from "react-icons/md"
import type { ComponentProps } from "react"

interface ReportIssueTriggerProps extends ComponentProps<typeof Button> {
  label?: string
}

export function ReportIssueTrigger({ label, className, ...props }: ReportIssueTriggerProps) {
  return (
    <Button
      variant="ghost"
      size={label ? "default" : "icon"}
      className={cn("gap-2", className)}
      {...props}
    >
      <MdOutlineBugReport className="size-4" />
      {label && <span>{label}</span>}
    </Button>
  )
}
