"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("vuedraggable"),p=require("../../../context.js");require("../../../../config-provider/index.js");require("./item.vue.js");const f=require("../../../../config-provider/hooks/use-namespace.js"),r=require("./item.vue2.js"),k=e.defineComponent({__name:"index",props:{value:{},"onUpdate:value":{type:Function}},setup(u){const{b:s,is:c}=f.useNamespace("ap-column-setting-sortable-item"),{columnsBackup:i}=p.useInjectApTable(),o=n=>n.flatMap(t=>[t,...t.children?o(t.children):[]]);function d(n){return o(i?.value??[]).find(m=>m.key===n.key)?n.show:!1}const a=e.ref(!1);return(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s)())},[e.createVNode(r.default,{open:a.value,"onUpdate:open":t[0]||(t[0]=l=>a.value=l),value:u.value},null,8,["open","value"]),u.value.children?.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("hidden",a.value))},[e.createVNode(e.unref(v),{modelValue:u.value.children,"onUpdate:modelValue":t[1]||(t[1]=l=>u.value.children=l),"item-key":"key"},{item:e.withCtx(({element:l})=>[d(l)?(e.openBlock(),e.createBlock(r.default,{key:0,value:l,level:2},null,8,["value"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])],2)):e.createCommentVNode("",!0)],2))}});exports.default=k;
