import{b as C}from"./vue-router-c1461dfc.js";import{u as T}from"./vue-i18n-b3581196.js";import{s as R}from"./pinia-b6f74250.js";import{a as k}from"./index-a6ee13d3.js";import{H as _,e as I,_ as b,ah as r,o as B,c as Q,V as i,P as m,a as H,T as N,U as O,n as U}from"./@vue-6dabbe94.js";import{_ as A}from"./_plugin-vue_export-helper-c27b6911.js";import"./@intlify-ea47d1db.js";import"./source-map-7d7e1c08.js";import"./vue-b1ba6f14.js";import"./js-cookie-edb2da2a.js";import"./@element-plus-64e6e14a.js";import"./nprogress-08a53ce8.js";import"./axios-4a70c6fc.js";import"./qs-c5b6dbf2.js";import"./side-channel-394f276c.js";import"./get-intrinsic-bd2830fd.js";import"./has-symbols-e8f3ca0e.js";import"./has-proto-f7d0b240.js";import"./function-bind-22e7ee79.js";import"./has-26d28e02.js";import"./call-bind-e5c1c8b0.js";import"./object-inspect-8fd4bade.js";import"./element-plus-91d6d961.js";import"./lodash-es-9851428c.js";import"./@vueuse-e129c873.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-f6fdf7b4.js";import"./async-validator-dee29e8b.js";import"./memoize-one-297ddbcb.js";import"./escape-html-b8998962.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-880a26aa.js";import"./mitt-f7ef348c.js";import"./vue-grid-layout-ec2a62c3.js";const M={class:"layout-search-dialog"},P=_({name:"layoutBreadcrumbSearch"}),$=_({...P,setup(D,{expose:d}){const f=k(),{tagsViewRoutes:h}=R(f),p=I(),{t:w}=T(),u=C(),t=b({isShowSearch:!1,menuQuery:"",tagsViewList:[]}),V=()=>{t.menuQuery="",t.isShowSearch=!0,v(),U(()=>{setTimeout(()=>{p.value.focus()})})},S=()=>{t.isShowSearch=!1},g=(e,o)=>{let s=e?t.tagsViewList.filter(L(e)):t.tagsViewList;o(s)},L=e=>o=>o.path.toLowerCase().indexOf(e.toLowerCase())>-1||o.meta.title.toLowerCase().indexOf(e.toLowerCase())>-1||w(o.meta.title).indexOf(e.toLowerCase())>-1,v=()=>{if(t.tagsViewList.length>0)return!1;h.value.map(e=>{var o;(o=e.meta)!=null&&o.isHide||t.tagsViewList.push({...e})})},x=e=>{var n,l,c;let{path:o,redirect:s}=e;(n=e.meta)!=null&&n.isLink&&!((l=e.meta)!=null&&l.isIframe)?window.open((c=e.meta)==null?void 0:c.isLink):s?u.push(s):u.push(o),S()};return d({openSearch:V}),(e,o)=>{const s=r("ele-Search"),n=r("el-icon"),l=r("SvgIcon"),c=r("el-autocomplete"),y=r("el-dialog");return B(),Q("div",M,[i(y,{modelValue:t.isShowSearch,"onUpdate:modelValue":o[1]||(o[1]=a=>t.isShowSearch=a),"destroy-on-close":"","show-close":!1},{footer:m(()=>[i(c,{modelValue:t.menuQuery,"onUpdate:modelValue":o[0]||(o[0]=a=>t.menuQuery=a),"fetch-suggestions":g,placeholder:e.$t("message.user.searchPlaceholder"),ref_key:"layoutMenuAutocompleteRef",ref:p,onSelect:x,"fit-input-width":!0},{prefix:m(()=>[i(n,{class:"el-input__icon"},{default:m(()=>[i(s)]),_:1})]),default:m(({item:a})=>[H("div",null,[i(l,{name:a.meta.icon,class:"mr5"},null,8,["name"]),N(" "+O(e.$t(a.meta.title)),1)])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["modelValue"])])}}});const xe=A($,[["__scopeId","data-v-cb78cee8"]]);export{xe as default};
