import{k as s,ah as e,o as l,V as a,W as t,X as n,Z as i,Y as o,O as c,a3 as p,a2 as r,F as m,L as d,a1 as u,c as x,J as f,N as v,_ as h,l as y,v as w}from"./base-lib.js?v=20260328163632";import{u as g,bQ as _,l as k,_ as b,bN as C,q as L,f as R}from"./utils-lib.js?v=20260328163632";import{B as j}from"./naive-ui.js?v=20260328163632";const V=""+new URL("../images/soft_ico/hot.png",import.meta.url).href,E=""+new URL("../images/soft_ico/hots.png",import.meta.url).href,H={class:"type-item"},P={class:"type-name justify-between"},A={class:"flex items-center"},S={class:"history-list relative max-h-[200px] overflow-x-hidden overflow-y-auto"},U=["onClick","title"],B={class:"truncate leading-16px"},D=["onClick"],F={class:"type-item"},I={class:"type-name"},M={class:"search-list"},N=["onClick"],O={key:0,class:"type-item"},q={class:"type-name"},z={class:"recommend-list"},J=["onClick"],Q=["src"],W=b(s({__name:"history",setup(s){const{isAaPanel:x}=g(),{historyList:f,softSearchList:v,softRecommendList:h}=e(_()),{handleOpenPluginEvent:y,clearFindHistoryEvent:w,inputHistoryEvent:b,clearAllHistoryEvent:C,initHistory:L}=_();return l(L),(s,e)=>{const l=j;return a(),t("div",{class:"history-box w-[560px] lt-xl:(!w-[500px]) lt-lg:(!w-[360px]) <md:(!w-[300px]) lt-sm:(!w-[200px])",onMousedown:e[0]||(e[0]=r((()=>{}),["prevent"]))},[n("div",H,[n("span",P,[n("span",null,i(o(k)("搜索历史")),1),c(l,{type:"default",size:"small",onClick:r(o(C),["stop"])},{default:p((()=>[n("span",A,[e[1]||(e[1]=n("i",{class:"svgtofont-el-delete mr-[4px]"},null,-1)),n("span",null,i(o(k)("清空")),1)])])),_:1},8,["onClick"])]),n("div",S,[(a(!0),t(m,null,d(o(f),((s,e)=>(a(),t("div",{class:"history-item max-w-[calc(100%+10px)] h-[30px]",onClick:e=>o(b)(s.val),title:s.val},[n("span",B,i(s.val),1),n("i",{class:"svgtofont-el-close p-[2px]",onClick:r((l=>o(w)(s.val,e)),["stop"])},null,8,D)],8,U)))),256))])]),n("div",F,[n("span",I,[n("span",null,i(o(k)("搜索排行")),1),e[2]||(e[2]=n("img",{class:"w-[24px] h-[12px] ml-[5px]",src:V,alt:""},null,-1))]),n("div",M,[(a(!0),t(m,null,d(o(v),(s=>(a(),t(m,null,[o(x)&&"MongoDB"!==s.name||!o(x)?(a(),t("div",{key:0,class:"search-item",onClick:e=>o(y)(s.ename)},i(s.name),9,N)):u("",!0)],64)))),256))])]),o(x)?u("",!0):(a(),t("div",O,[n("span",q,[n("span",null,i(o(k)("热门推荐")),1),e[3]||(e[3]=n("img",{class:"w-[14px] h-[14px] ml-[5px]",src:E,alt:""},null,-1))]),n("div",z,[(a(!0),t(m,null,d(o(h),(s=>(a(),t("div",{class:"recommend-item",onClick:e=>o(y)(s.ename,210)},[n("img",{src:"../static/images/soft_ico/ico-".concat(s.ename,".png")},null,8,Q),n("span",null,i(s.name),1)],8,J)))),256))])]))],32)}}}),[["__scopeId","data-v-af1086e8"]]),X={class:"w-full flex items-center justify-between mb-[20px] flex-wrap"},Y={class:"flex items-center"},Z={class:"soft-left-title w-[80px] pr-16px text-[14px] flex justify-end"},$={class:"flex flex-1 relative"},G={class:"flex items-center mt-4px"},K=b(s({__name:"index",setup(s){const{searchRef:e,isLoading:l,searchVal:r,showRefresh:m,tabActive:d,refreshRouteData:g,$reset_history:_}=C(),b=x((()=>"deployment"===d.value));return f(_),(s,d)=>{const x=j;return a(),t("div",X,[n("div",Y,[n("span",Z,i(o(k)("应用搜索")),1),n("div",$,[c(o(L),{class:"!w-[580px] lt-xl:(!w-[500px]) lt-lg:(!w-[360px]) <md:(!w-[300px]) lt-sm:(!w-[200px])",ref_key:"searchRef",ref:e,modelValue:o(r),"onUpdate:modelValue":d[0]||(d[0]=s=>v(r)?r.value=s:null),placement:"bottom-start",disabledPopover:o(b),onSearch:d[1]||(d[1]=s=>o(g)(0,1)),placeholder:o(k)("支持应用名称、字段模糊搜索")},{default:p((()=>[o(m)?(a(),h(W,{key:0})):u("",!0)])),_:1},8,["modelValue","disabledPopover","placeholder"])])]),n("div",G,[c(x,{onClick:d[2]||(d[2]=s=>o(g)(1)),disabled:o(l)},{default:p((()=>[y(c(o(R),{icon:"el-loading mr-4px"},null,512),[[w,o(l)]]),n("span",null,i(o(k)("更新软件列表 / 支付状态")),1)])),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-3894c77c"]]);export{K as S};
