import { useLoadQuerys } from "@/common/composeabe/LoadQuerys";
import { navTo } from "@imengyu/imengyu-utils/dist/uniapp/PageAction";

export function useTaskEntryForm() {
  const { querys } = useLoadQuerys({ 
    villageId: 0,  
    villageVolunteerId: 0,
  });
  
  function goForm(subType: string, subId: number, subKey = 'type', type = 'list') {
    navTo('../forms/' + type, {
      villageId: querys.value.villageId,  
      villageVolunteerId: querys.value.villageVolunteerId,  
      subType,
      subId,
      subKey,
    })
  }

  return {
    goForm,
  }
}