import {onBeforeMount, ref} from "vue";
import {useRootStore} from "@/stores/useStore";

export function useGetUnitSelect(formC,modelValue){
 const store = useRootStore()
 const formConfig = ref({...formC})
 onBeforeMount(()=> {
  const findItem = formConfig.value.formItemsArr.find(i => i.modelValue === modelValue)
  console.log('store.allSelectUnit',store.allSelectUnit,findItem)

  findItem.options = [...store.allSelectUnit]
 })
 return {
  formConfig
 }
}
