import{a as k}from"./useAsync.df7387ce.js";import{ak as y,al as E,a as D,r as C,a7 as N,u as a,Z as P,c as n,e as r,F as l,i as u,x as A,p as d,m as B}from"./index.4d061c66.js";const{VITE_PROXY_DOMAIN_REAL:L}=E();async function O(c={}){return y.request("post",`${L}admin/ulist`,{data:c})}const V={key:0,class:"mt-[10px]"},q=["onClick"],w=B("div",null,">",-1),z={key:1,class:"w-full leading-[198px] text-center border-[#ccc] border rounded-sm mt-2 color-[#ccc] font-bold"},S=D({__name:"organize-tree",props:{otherParms:null},emits:["breadcrumbChange"],setup(c,{expose:p,emit:m}){const _=c,s=C(""),{data:o,run:g,loading:f,isError:h}=k({initalData:{}});function v(e){s.value=e.value,i(),m("breadcrumbChange",e)}function i(){const e={...s.value?{pid:s.value}:{},..._.otherParms};g(O(e))}function x(){i()}return x(),p({changePid:e=>s.value=e,onSearch:()=>i()}),(e,F)=>{const b=N("loading");return a(o).depart&&a(o).item&&!a(h)?P((n(),r("ul",V,[(n(!0),r(l,null,u(a(o).depart,t=>(n(),r("li",{class:"leading-[30px] bg-red-300 flex gap-1 select-none cursor-pointer",onClick:()=>v(t),key:t.value},[A(d(t.name)+" ",1),w],8,q))),128)),(n(!0),r(l,null,u(a(o).item,t=>(n(),r("li",{class:"leading-[30px] bg-blue-300 flex gap-1 select-none cursor-pointer",key:t.value},d(t.nickname),1))),128))])),[[b,a(f)]]):(n(),r("div",z," \u6682\u65E0\u6570\u636E "))}}});export{S as _};
