import{u as d}from"./index.cb3c216d.js";import{b as u,x as f,o,f as l,j as i,h as e,t as p,y as v}from"./entry.5c8819da.js";const h={key:0,class:"absolute top-0 left-0 z-10 flex h-full w-full items-center justify-center"},m=e("div",{class:"absolute top-0 left-0 h-full w-full bg-black opacity-75"},null,-1),_=e("div",{class:"z-10 text-lg font-semibold text-gray-100"}," Copied! ",-1),b=[m,_],y=v('<div class="relative flex h-12 w-full items-center border-b-2 border-gray-800"><div class="ml-4 flex"><div class="h-3 w-3 rounded-full bg-red-400"></div><div class="ml-2 h-3 w-3 rounded-full bg-yellow-400"></div><div class="ml-2 h-3 w-3 rounded-full bg-green-400"></div></div><div class="absolute top-0 left-0 flex h-full w-full items-center justify-center font-semibold"> Bash </div></div>',1),g={class:"flex flex-1 p-4 font-mono"},x=e("span",{class:"mr-2 inline-block select-none font-bold"},"$",-1),w={class:"inline-block text-gray-200"},k={key:1,class:"py-2 text-center font-semibold opacity-0 transition-opacity group-hover:opacity-100"},N=u({__name:"Terminal",props:{content:{type:String,required:!0}},setup(s){const c=s,{copy:n}=d(),t=f("init"),a=r=>{n(c.content).then(()=>{t.value="copied",setTimeout(()=>{t.value="init"},1e3)}).catch(()=>{console.warn("Couldn't copy to clipboard!")})};return(r,C)=>(o(),l("div",{class:"group relative flex h-64 w-full cursor-pointer flex-col overflow-hidden rounded-lg bg-gray-900",onClick:a},[t.value==="copied"?(o(),l("div",h,b)):i("",!0),y,e("div",g,[x,e("span",w,p(s.content),1)]),t.value!=="copied"?(o(),l("div",k," Click to copy ")):i("",!0)]))}});export{N as _};
