"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../utils/legacyUtil.js");function h(a,n,d){const u=e.shallowRef(),i=e.shallowRef(),c=e.shallowRef(),o=e.shallowRef([]);return e.watch([a,n],()=>{a.value?o.value=e.toRaw(a.value).slice():o.value=g.convertChildrenToData(n.value)},{immediate:!0,deep:!0}),e.watchEffect(()=>{const r=o.value,v=new Map,f=new Map,l=d.value;function p(w,O=!1){for(let s=0;s<w.length;s+=1){const t=w[s];!t[l.options]||O?(v.set(t[l.value],t),f.set(t[l.label],t)):p(t[l.options],!0)}}p(r),u.value=r,i.value=v,c.value=f}),{options:u,valueOptions:i,labelOptions:c}}exports.default=h;
