"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue"),x=require("../../_util/props-util/index.js"),C=require("../TreeNode.js"),T=require("../../_util/util.js");function j(e){return e&&e.type&&e.type.isTreeSelectNode}function L(e){function r(f=[]){return x.filterEmpty(f).map(c=>{if(!j(c))return null;const a=c.children||{},g=c.key,i={};for(const[u,O]of Object.entries(c.props))i[T.camelize(u)]=O;const{isLeaf:n,checkable:p,selectable:o,disabled:l,disableCheckbox:s}=i,d={isLeaf:n||n===""||void 0,checkable:p||p===""||void 0,selectable:o||o===""||void 0,disabled:l||l===""||void 0,disableCheckbox:s||s===""||void 0},t={...i,...d},{title:k=a.title?.(t),switcherIcon:y=a.switcherIcon?.(t),...v}=i,P=a.default?.(),b={...v,title:k,switcherIcon:y,key:g,isLeaf:n,...d},h=r(P);return h.length&&(b.children=h),b})}return r(e)}function q(e){if(!e)return e;const r={...e};return"props"in r||Object.defineProperty(r,"props",{get(){return r}}),r}function I(e,r,f,c,a,g){let i=null,n=null;function p(){function o(l,s="0",d=!1){return l.map((t,k)=>{const y=`${s}-${k}`,v=t[g.value],P=f.includes(v),b=o(t[g.children]||[],y,P),h=m.createVNode(C.default,t,{default:()=>[b.map(u=>u.node)]});if(r===v&&(i=h),P){const u={pos:y,node:h,children:b};return d||n.push(u),u}return null}).filter(t=>t)}n||(n=[],o(c),n.sort(({node:{props:{value:l}}},{node:{props:{value:s}}})=>{const d=f.indexOf(l),t=f.indexOf(s);return d-t}))}Object.defineProperty(e,"triggerNode",{get(){return p(),i}}),Object.defineProperty(e,"allCheckedNodes",{get(){return p(),a?n:n.map(({node:o})=>o)}})}exports.convertChildrenToData=L;exports.fillAdditionalInfo=I;exports.fillLegacyProps=q;
