import{r as registerInstance,h,H as Host}from"./index-da72c774.js";var XCopy=function(){function t(t){registerInstance(this,t);this.content=undefined}t.prototype.copyContent=function(){if(!navigator.clipboard){this.fallbackCopyTextToClipboard();return}navigator.clipboard.writeText(this.content).then((function(){}),(function(t){console.warn(t)}))};t.prototype.fallbackCopyTextToClipboard=function(){var t=document.createElement("textarea");t.value=this.content;t.style.top="0";t.style.left="0";t.style.position="fixed";document.body.appendChild(t);t.focus();t.select();try{document.execCommand("copy")}catch(t){console.warn(t)}document.body.removeChild(t)};t.prototype.render=function(){return h(Host,{key:"0d00222c32d5f65842a653b08def7df4e6b3987b",onClick:this.copyContent},h("slot",{key:"698353c486befc03e1b4b274f0a6ecc07be285dc"}))};return t}();export{XCopy as x_copy};