import{u as y}from"./hooks.9f8f44e2.js";import{J as T,d as B}from"./status.2b37e8be.js";import{a as g,b as u,c as i,j as s,h as l,f as t,x as _,p as f,u as d,l as p,m as E}from"./index.4d061c66.js";const w={class:"w-full flex justify-between"},F=E("p",null,"\u64CD\u4F5C",-1),D=g({__name:"ladder-table",props:{ladder:null,type:null,readonly:{type:Boolean}},emits:["choose","delete","update"],setup(o,{emit:c}){return(z,C)=>{const n=u("ElTableColumn"),x=u("ElImage"),b=u("ElTag"),r=u("ElButton"),h=u("ElTooltip"),k=u("ElTable");return i(),s(k,{size:"small",border:"",data:o.ladder},{default:l(()=>[t(n,{prop:"name",label:"\u987A\u5E8F",width:"60px"},{default:l(({$index:a})=>[_(f(a+1),1)]),_:1}),t(n,{prop:"img",label:"\u56FE\u7247",width:"50px"},{default:l(({$index:a,row:e})=>[t(x,{fit:"cover",lazy:"",style:{height:"20px"},"z-index":"99999","preview-teleported":!0,src:e.img,"preview-src-list":e.img!==""?[e.img]:[]},null,8,["src","preview-src-list"])]),_:1}),t(n,{prop:"jump_type",label:"\u8DF3\u8F6C\u7C7B\u578B",width:"85px"},{default:l(({row:a})=>[t(b,{size:"small"},{default:l(()=>{var e;return[_(f(((e=d(T).find(({id:m})=>m===a.jump_type+""))==null?void 0:e.label)||"--"),1)]}),_:2},1024)]),_:1}),t(n,{prop:"jump_param",label:"\u8DF3\u8F6C\u5730\u5740"}),o.type==="2"||o.type===2?(i(),s(n,{key:0,prop:"title",label:"\u6807\u9898",width:"70px"})):p("",!0),o.type==="4"||o.type===4?(i(),s(n,{key:1,prop:"style_type",label:"\u6837\u5F0F\u7C7B\u578B",width:"70px"},{default:l(({row:a})=>[t(b,{size:"small"},{default:l(()=>{var e;return[_(f(((e=d(B).find(({id:m})=>m===a.style_type+""))==null?void 0:e.label)||"--"),1)]}),_:2},1024)]),_:1})):p("",!0),o.readonly?p("",!0):(i(),s(n,{key:2,width:"70px"},{header:l(()=>[E("div",w,[F,t(h,{content:"\u6DFB\u52A0\u6570\u636E",placement:"top"},{default:l(()=>[t(r,{link:"",size:"small",icon:d(y)("add"),onClick:C[0]||(C[0]=()=>c("choose"))},null,8,["icon"])]),_:1})])]),default:l(({$index:a,row:e})=>[o.type!=="3"&&o.type!==3?(i(),s(r,{key:0,link:"",size:"small",icon:d(y)("edits"),onClick:()=>c("update",{data:e,index:a})},null,8,["icon","onClick"])):p("",!0),t(r,{link:"",size:"small",icon:d(y)("delete"),onClick:()=>c("delete",a)},null,8,["icon","onClick"])]),_:1}))]),_:1},8,["data"])}}});export{D as _};
