import{o as e,u as a,p as l,l as s,q as o}from"./utils-lib.js?v=20260328163632";import{k as t,Q as n,c as r,w as c,o as u,V as i,_ as p,a3 as m,Y as d,W as v,O as f,N as h,a1 as g,n as w}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const y={key:0,class:"mr-10px"},S=t({__name:"index",setup(t){const{BtRouterTabs:S}=e({}),{getAuthType:_}=a(),{openSSLPopup:b,openPortPopup:j,settingSearch:x,getConfigData:q}=l(),V=n(),k=r((()=>V.name)),A=r((()=>"whole"===k.value||"panel"===k.value||"safe"===k.value));c((()=>x.value),(()=>{w((()=>{document.querySelectorAll(".empty-search").forEach((function(e){var a;null==(a=e.parentNode)||a.removeChild(e)}));if(0==document.querySelectorAll('.config-rows[style="display: flex;"]').length){const e=document.createElement("div");e.className="empty-search flex items-center justify-center w-full py-[15px]",e.innerHTML=s("暂无搜索结果");const a=document.querySelector(".router-tabs-content .search-results");a&&a.appendChild(e)}}))}),{immediate:!0}),c((()=>k.value),(e=>{"whole"!==e&&"panel"!==e&&"safe"!==e||(x.value="")}));return u((async()=>{x.value="",_(),await q(),(()=>{const e=window.localStorage.getItem("config-dialog");switch(e){case"ssl":b.value=!0;break;case"port":j.value=!0}e&&window.localStorage.removeItem("config-dialog")})()})),(e,a)=>(i(),p(d(S),null,{right:m((()=>[d(A)?(i(),v("div",y,[f(d(o),{class:"search !w-240px",placeholder:d(s)("搜索设置项"),modelValue:d(x),"onUpdate:modelValue":a[0]||(a[0]=e=>h(x)?x.value=e:null)},null,8,["placeholder","modelValue"])])):g("",!0)])),_:1}))}});export{S as default};
