"use client"
import{a as r}from"./chunk-EHYVEIOL.mjs";import{a}from"./chunk-BKZ6TNZC.mjs";import{d as e}from"./chunk-ZYBJOEYC.mjs";import{useState as u}from"react";import{toast as m}from"sonner";import{jsx as o,jsxs as g}from"react/jsx-runtime";function y({value:s,className:i,icon:n}){let[l,t]=u(!1),c=n||a;return g("button",{onClick:p=>{p.stopPropagation(),t(!0),navigator.clipboard.writeText(s).then(()=>{m.success("Copied to clipboard!")}),setTimeout(()=>t(!1),3e3)},className:e("group rounded-full bg-gray-100 p-1.5 transition-all duration-75 hover:scale-105 hover:bg-blue-100 active:scale-95",i),children:[o("span",{className:"sr-only",children:"Copy"}),l?o(r,{className:"text-gray-700 transition-all group-hover:text-blue-800"}):o(c,{className:"text-gray-700 transition-all group-hover:text-blue-800"})]})}export{y as a};
