import{d as l,q as d,Y as u,o as a,c as C,a as _,t as f,g as t,l as e,ar as y,b1 as m,n as x,x as g,_ as k}from"./C6MRUCyE.js";const b=["title"],v=l({__name:"CopyCode",props:{text:{}},setup(s){const c=g({id:"omorphia.component.copy.action.copy",defaultMessage:"Copy code to clipboard"}),{formatMessage:n}=d(),p=s,o=u(!1);async function r(){await navigator.clipboard.writeText(p.text),o.value=!0}return(i,h)=>(a(),C("button",{class:x(["code",{copied:o.value}]),title:e(n)(e(c)),onClick:r},[_("span",null,f(i.text),1),o.value?(a(),t(e(y),{key:0})):(a(),t(e(m),{key:1}))],10,b))}}),I=k(v,[["__scopeId","data-v-9692d097"]]);export{I as C};