import{_ as p}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{o as t,c,a as u,M as m,r as f,as as d,m as r}from"./index-Bb2UEb_P.js";import{_ as w}from"./IconCopy-CGHzZC-S.js";const v={},k={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"};function y(n,e){return t(),c("svg",k,e[0]||(e[0]=[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)]))}const h=p(v,[["render",y]]),b=m({__name:"CopyToClipboard",props:{value:{}},setup(n){const e=n,o=f(!1),a=d();async function i(){try{await navigator.clipboard.writeText(e.value),o.value=!0,a.addEvent("Значение скопировано в буфер обмена"),setTimeout(()=>o.value=!1,1e3)}catch(s){console.error("Ошибка копирования:",s)}}return(s,x)=>{const _=w,l=h;return t(),c("button",{type:"button",class:"tw-items-center tw-justify-center hover:tw-text-orange-500 tw-h-6",onClick:i},[o.value?(t(),r(l,{key:1,class:"tw-size-4"})):(t(),r(_,{key:0,class:"tw-size-4"}))])}}});export{b as _};
