import{LoadingIcon as u,wait as l}from"@vuepress/helper/client";import{watchImmediate as p}from"@vueuse/core";import{defineComponent as d,ref as s,computed as f,h as o,onMounted as v,nextTick as w}from"vue";import{useLang as c}from"vuepress/client";import{b as k}from"../index-C4kzYjlG.js";var h=d({name:"TwikooComment",props:{identifier:{type:String,required:!0}},setup(i){const e=k(),a=c(),t=s(!1),n=f(()=>!!e.value.envId),r=async()=>{if(__VUEPRESS_SSR__)return;const[{init:m}]=await Promise.all([import("twikoo"),l(e.value.delay??800)]);t.value=!0,await w(),await m({lang:a.value==="zh-CN"?"zh-CN":"en",path:i.identifier,...e.value,el:"#twikoo-comment"})};return v(()=>{p(()=>[i.identifier,e.value],()=>r(),{flush:"post"})}),()=>n.value?o("div",{id:"comment",class:"twikoo-wrapper"},[t.value?null:o(u),o("div",{id:"twikoo-comment"})]):null}});export{h as default}; //# sourceMappingURL=TwikooComment.js.map