import{u as p}from"./index-6e2e2ed7.mjs";import{_ as u,d as f,k as _,o as l,c as n,h as a,a as t,t as m,l as v}from"./entry-d195bacb.mjs";import"./index-c5cfdf94.mjs";const y=f({name:"Terminal",props:{content:{type:String,required:!0}},setup(c,{expose:i}){i();const o=c,{copy:e}=p(),s=_("init"),r={props:o,copyToClipboard:e,state:s,copy:N=>{e(o.content).then(()=>{s.value="copied",setTimeout(()=>{s.value="init"},1e3)}).catch(()=>{console.warn("Couldn't copy to clipboard!")})}};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),h={key:0,class:"absolute top-0 left-0 z-10 flex h-full w-full items-center justify-center"},b=t("div",{class:"absolute top-0 left-0 h-full w-full bg-gray-900 opacity-75"},null,-1),g=t("div",{class:"z-10 text-lg font-semibold text-gray-100"},"Copied!",-1),x=[b,g],w=v('<div class="relative flex h-12 w-full items-center border-b-2 border-gray-700"><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),k={class:"flex flex-1 p-4 font-mono"},C=t("span",{class:"mr-2 inline-block select-none font-bold"},"$",-1),S={class:"inline-block text-gray-200"},B={key:1,class:"py-2 text-center font-semibold opacity-0 transition-opacity group-hover:opacity-100"};function j(c,i,o,e,s,d){return l(),n("div",{class:"group relative flex h-64 w-full cursor-pointer flex-col overflow-hidden rounded-lg bg-gray-800 text-gray-600",onClick:e.copy},[e.state==="copied"?(l(),n("div",h,x)):a("",!0),w,t("div",k,[C,t("span",S,m(o.content),1)]),e.state!=="copied"?(l(),n("div",B,"Click to copy")):a("",!0)])}var q=u(y,[["render",j]]);export{q as default};
