import{r as u}from"./vue-chunks-l-AyUCfi.js";const d=()=>{const t=u(!1),a=u(""),n=u(!1);!navigator.clipboard&&!document.execCommand?n.value=!1:n.value=!0;const r=o=>{if(navigator.clipboard){navigator.clipboard.writeText(o).then(()=>{a.value=o,t.value=!0,c()});return}const e=document.createElement("input");e.setAttribute("readonly","readonly"),e.setAttribute("value",o),document.body.appendChild(e),e.select(),e.setSelectionRange(0,9999),document.execCommand("copy")&&(a.value=o,document.execCommand("copy"),t.value=!0,c()),document.body.removeChild(e)},c=()=>{setTimeout(()=>{t.value=!1},1500)};return{copy:r,text:a,copied:t,isSupported:n}};export{d as u};
