import{a as g,r as V,aj as c,c as _,o as m,b as n,S as e,K as t,M as B,u as i,Q as w,Y as p}from"./vue.D1BjjNmv.js";import{ab as z,V as E,X as M}from"./index.D93ign_E.js";import{_ as R}from"./_plugin-vue_export-helper.DlAUqK2U.js";const S={class:"document-tree-container"},$={class:"custom-tree-node"},j={class:"node-label"},A={class:"ml-2"},I={key:0,class:"node-actions"},K=g({__name:"index",props:{treeData:{type:Array,default:()=>[]}},emits:["treeClick","updateDocument","deleteDocument"],setup(f,{expose:h,emit:k}){const a=k,r=V(null),C={children:"children",label:"name"},v=o=>{a("treeClick",o)},y=o=>{a("updateDocument","update",o)},D=(o,s)=>{a("deleteDocument",s.id,()=>{})};return h({treeRef:r}),(o,s)=>{const d=c("el-icon"),u=c("el-button"),x=c("el-tree");return m(),_("div",S,[s[0]||(s[0]=n("div",{class:"document-tree-header"},[n("span",{class:"document-tree-title"},"职位")],-1)),e(x,{ref_key:"treeRef",ref:r,data:f.treeData,"node-key":"id",props:C,"default-expand-all":"","highlight-current":"",onNodeClick:v},{default:t(({node:b,data:l})=>[n("div",$,[n("div",j,[e(d,null,{default:t(()=>[e(i(z))]),_:1}),n("span",A,w(l.title),1)]),l.id?(m(),_("div",I,[e(u,{type:"primary",link:"",size:"small",onClick:p(N=>y(l),["stop"])},{default:t(()=>[e(d,null,{default:t(()=>[e(i(E))]),_:1})]),_:2},1032,["onClick"]),e(u,{type:"danger",link:"",size:"small",onClick:p(N=>D(b,l),["stop"])},{default:t(()=>[e(d,null,{default:t(()=>[e(i(M))]),_:1})]),_:2},1032,["onClick"])])):B("",!0)])]),_:1},8,["data"])])}}}),X=R(K,[["__scopeId","data-v-10e59206"]]);export{X as default};
