"use client"
import{a as r}from"./chunk-EHYVEIOL.mjs";import{a as e}from"./chunk-BKZ6TNZC.mjs";import{j as o}from"./chunk-E54KY7UT.mjs";import{cva as g}from"class-variance-authority";import{useState as f}from"react";import{toast as d}from"sonner";import{jsx as t,jsxs as b}from"react/jsx-runtime";var v=g("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-gray-100 hover:scale-105 hover:bg-blue-100 active:scale-95 text-gray-700 hover:text-blue-800",neutral:"bg-transparent hover:bg-gray-100 active:bg-gray-200"}},defaultVariants:{variant:"default"}});function x({variant:s="default",value:n,className:i,icon:c,successMessage:p}){let[l,a]=f(!1),u=c||e;return b("button",{onClick:m=>{m.stopPropagation(),a(!0),navigator.clipboard.writeText(n).then(()=>{d.success(p||"Copied to clipboard!")}),setTimeout(()=>a(!1),3e3)},className:o(v({variant:s}),i),type:"button",children:[t("span",{className:"sr-only",children:"Copy"}),l?t(r,{className:"h-3.5 w-3.5"}):t(u,{className:"h-3.5 w-3.5"})]})}export{x as a};
