import{r as registerInstance,h,H as Host}from"./index-aed5ae27.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:"a289df472974df8a42fc9cb039ff54e1878baf33",onClick:this.copyContent},h("slot",{key:"bfc68f693f295687825567501ac1f0120e02f179"}))};return t}();export{XCopy as x_copy};