"use client"

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

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

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