"use client"
import{a as r}from"./chunk-EHYVEIOL.mjs";import{a as o}from"./chunk-BKZ6TNZC.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 y=g("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-gray-100 active:bg-gray-200",neutral:"bg-transparent hover:bg-gray-100 active:bg-gray-200"}},defaultVariants:{variant:"default"}});function w({variant:n="default",value:s,className:i,icon:p,successMessage:c}){let[u,a]=f(!1),l=p||o;return b("button",{onClick:m=>{m.stopPropagation(),a(!0),navigator.clipboard.writeText(s).then(()=>{d.success(c||"Copied to clipboard!")}),setTimeout(()=>a(!1),3e3)},className:(void 0)(y({variant:n}),i),type:"button",children:[t("span",{className:"sr-only",children:"Copy"}),u?t(r,{className:"h-3.5 w-3.5"}):t(l,{className:"h-3.5 w-3.5"})]})}export{w as a};
