"use client"

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

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

export function ResolutionTrigger({ label, className, ...props }: ResolutionTriggerProps) {
  return (
    <Button
      variant="outline"
      size={label ? "default" : "icon"}
      className={cn("gap-2", className)}
      {...props}
    >
      <MdOutlineRateReview className="size-4" />
      {label && <span>{label}</span>}
    </Button>
  )
}
