import{isValidElement as e}from"../../_util/props-util/index.mjs";import{cloneElement as t}from"../../_util/vnode.mjs";import{toPathKey as n}from"../utils/commonUtil.mjs";import{toPathOptions as r}from"../utils/treeUtil.mjs";import{computed as i}from"vue";var a=(a,o,s,c,l)=>i(()=>{let i=l.value||(({labels:n})=>{let r=c.value?n.slice(-1):n;return r.every(e=>[`string`,`number`].includes(typeof e))?r.join(` / `):r.reduce((n,r,i)=>{let a=e(r)?t(r,{key:i}):r;return i===0?[a]:[...n,` / `,a]},[])});return a.value.map(e=>{let t=r(e,o.value,s.value),a=i({labels:t.map(({option:e,value:t})=>e?.[s.value.label]??t),selectedOptions:t.map(({option:e})=>e)}),c=n(e);return{label:a,value:c,key:c,valueCells:e}})});export{a as default};