import{N as e,O as a}from"./utils-lib.js?v=1761009159";import{g as s}from"./useStore.js?v=1761009159";import{u as o}from"./index110.js?v=1761009159";import{c as t,b as l,g as r,w as n,q as i,a6 as c,v as m,N as u,B as p,y as d,x as f,e as g,Q as v,D as h,n as y}from"./base-lib.js?v=1761009159";import{d as j}from"./validator.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./config.js?v=1761009159";import"./index111.js?v=1761009159";import"./index112.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const w={key:0,class:"mr-1rem"},x=t({__name:"index",setup(t){const{getGlobalConfig:x}=s(),{refs:{settingSearch:S,openSSLPopup:_,openPortPopup:b}}=s(),N=l(),{BtRouterTabs:q}=o(),E=r(()=>N.name),k=r(()=>"whole"===E.value||"panel"===E.value||"safe"===E.value);n(()=>S.value,()=>{y(()=>{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-[1.5rem]",e.innerHTML='暂无搜索结果，<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>';e.querySelectorAll(".NpsDialog").forEach(e=>{e.addEventListener("click",function(){j({name:"面板设置",type:23,id:30})})});const a=document.querySelector(".router-tabs-content .search-results");a&&a.appendChild(e)}})},{immediate:!0}),n(()=>E.value,e=>{"whole"!==e&&"panel"!==e&&"safe"!==e&&"ui"!==e||(S.value="")});return i(async()=>{S.value="",await x(),(()=>{const e=window.localStorage.getItem("config-dialog");switch(e){case"ssl":_.value=!0;break;case"port":b.value=!0}e&&window.localStorage.removeItem("config-dialog")})()}),c(()=>{e(["/config?action=get_menu_list"])}),(e,s)=>{const o=a;return m(),u(d(q),null,{right:p(()=>[d(k)?(m(),f("div",w,[g(o,{class:"search !w-24rem",placeholder:"搜索设置项",modelValue:d(S),"onUpdate:modelValue":s[0]||(s[0]=e=>v(S)?S.value=e:null)},null,8,["modelValue"])])):h("",!0)]),_:1})}}});export{x as default};
