import{u as f}from"./hooks.9f8f44e2.js";import{a as b,b as a,c,j as p,h as e,f as l,x as s,p as y,m as i,u as B,l as k}from"./index.4d061c66.js";const E={class:"w-full flex justify-between"},x=i("p",null,"\u64CD\u4F5C",-1),N=b({__name:"ladder-table",props:{ladder:null,readonly:{type:Boolean}},emits:["choose","delete","update"],setup(d,{emit:n}){return(T,r)=>{const o=a("ElTableColumn"),u=a("ElButton"),m=a("ElTooltip"),_=a("ElTable");return c(),p(_,{size:"small",border:"",data:d.ladder},{default:e(()=>[l(o,{prop:"name",label:"\u987A\u5E8F"},{default:e(({$index:t})=>[s(y(t+1),1)]),_:1}),l(o,{prop:"key",label:"\u7C7B\u578B"}),l(o,{prop:"value",label:"\u7C7B\u578B\u503C"}),d.readonly?k("",!0):(c(),p(o,{key:0},{header:e(()=>[i("div",E,[x,l(m,{content:"\u6DFB\u52A0\u9636\u68AF",placement:"top"},{default:e(()=>[l(u,{link:"",icon:B(f)("add"),onClick:r[0]||(r[0]=()=>n("choose"))},null,8,["icon"])]),_:1})])]),default:e(({$index:t,row:C})=>[l(u,{text:"",type:"primary",size:"small",onClick:()=>n("update",{data:C,index:t})},{default:e(()=>[s("\u7F16\u8F91")]),_:2},1032,["onClick"]),l(u,{text:"",type:"primary",size:"small",onClick:()=>n("delete",t)},{default:e(()=>[s("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1}))]),_:1},8,["data"])}}});export{N as _};
