| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  | import { useCallback, useMemo } from 'react' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import produce from 'immer' | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  | import { v4 as uuid4 } from 'uuid' | 
					
						
							| 
									
										
										
										
											2024-08-15 17:26:11 +08:00
										 |  |  | import { useUpdateNodeInternals } from 'reactflow' | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  | import type { | 
					
						
							|  |  |  |   Var, | 
					
						
							|  |  |  | } from '../../types' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import { VarType } from '../../types' | 
					
						
							|  |  |  | import { LogicalOperator } from './types' | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  | import type { | 
					
						
							|  |  |  |   CaseItem, | 
					
						
							|  |  |  |   HandleAddCondition, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   HandleAddSubVariableCondition, | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   HandleRemoveCondition, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   HandleToggleConditionLogicalOperator, | 
					
						
							|  |  |  |   HandleToggleSubVariableConditionLogicalOperator, | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   HandleUpdateCondition, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   HandleUpdateSubVariableCondition, | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   IfElseNodeType, | 
					
						
							|  |  |  | } from './types' | 
					
						
							|  |  |  | import { | 
					
						
							|  |  |  |   branchNameCorrect, | 
					
						
							|  |  |  |   getOperators, | 
					
						
							|  |  |  | } from './utils' | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  | import useIsVarFileAttribute from './use-is-var-file-attribute' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import useNodeCrud from '@/app/components/workflow/nodes/_base/hooks/use-node-crud' | 
					
						
							|  |  |  | import { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   useEdgesInteractions, | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |   useNodesReadOnly, | 
					
						
							|  |  |  | } from '@/app/components/workflow/hooks' | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  | import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | const useConfig = (id: string, payload: IfElseNodeType) => { | 
					
						
							| 
									
										
										
										
											2024-08-15 17:26:11 +08:00
										 |  |  |   const updateNodeInternals = useUpdateNodeInternals() | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |   const { nodesReadOnly: readOnly } = useNodesReadOnly() | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const { handleEdgeDeleteByDeleteBranch } = useEdgesInteractions() | 
					
						
							|  |  |  |   const { inputs, setInputs } = useNodeCrud<IfElseNodeType>(id, payload) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   const filterVar = useCallback(() => { | 
					
						
							|  |  |  |     return true | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   }, []) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-27 21:57:08 +08:00
										 |  |  |   const { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |     availableVars, | 
					
						
							|  |  |  |     availableNodesWithParent, | 
					
						
							|  |  |  |   } = useAvailableVarList(id, { | 
					
						
							|  |  |  |     onlyLeafNodeVar: false, | 
					
						
							|  |  |  |     filterVar, | 
					
						
							|  |  |  |   }) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const filterNumberVar = useCallback((varPayload: Var) => { | 
					
						
							|  |  |  |     return varPayload.type === VarType.number | 
					
						
							|  |  |  |   }, []) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   const { | 
					
						
							|  |  |  |     getIsVarFileAttribute, | 
					
						
							|  |  |  |   } = useIsVarFileAttribute({ | 
					
						
							|  |  |  |     nodeId: id, | 
					
						
							|  |  |  |     isInIteration: payload.isInIteration, | 
					
						
							| 
									
										
										
										
											2025-03-05 17:41:15 +08:00
										 |  |  |     isInLoop: payload.isInLoop, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const varsIsVarFileAttribute = useMemo(() => { | 
					
						
							|  |  |  |     const conditions: Record<string, boolean> = {} | 
					
						
							|  |  |  |     inputs.cases?.forEach((c) => { | 
					
						
							|  |  |  |       c.conditions.forEach((condition) => { | 
					
						
							|  |  |  |         conditions[condition.id] = getIsVarFileAttribute(condition.variable_selector!) | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     return conditions | 
					
						
							|  |  |  |   }, [inputs.cases, getIsVarFileAttribute]) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const { | 
					
						
							|  |  |  |     availableVars: availableNumberVars, | 
					
						
							|  |  |  |     availableNodesWithParent: availableNumberNodesWithParent, | 
					
						
							|  |  |  |   } = useAvailableVarList(id, { | 
					
						
							|  |  |  |     onlyLeafNodeVar: false, | 
					
						
							|  |  |  |     filterVar: filterNumberVar, | 
					
						
							|  |  |  |   }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleAddCase = useCallback(() => { | 
					
						
							| 
									
										
										
										
											2024-11-05 09:56:41 +08:00
										 |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       if (draft.cases) { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |         const case_id = uuid4() | 
					
						
							| 
									
										
										
										
											2024-11-05 09:56:41 +08:00
										 |  |  |         draft.cases.push({ | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |           case_id, | 
					
						
							|  |  |  |           logical_operator: LogicalOperator.and, | 
					
						
							|  |  |  |           conditions: [], | 
					
						
							|  |  |  |         }) | 
					
						
							| 
									
										
										
										
											2024-11-05 09:56:41 +08:00
										 |  |  |         if (draft._targetBranches) { | 
					
						
							|  |  |  |           const elseCaseIndex = draft._targetBranches.findIndex(branch => branch.id === 'false') | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |           if (elseCaseIndex > -1) { | 
					
						
							| 
									
										
										
										
											2024-11-05 09:56:41 +08:00
										 |  |  |             draft._targetBranches = branchNameCorrect([ | 
					
						
							|  |  |  |               ...draft._targetBranches.slice(0, elseCaseIndex), | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |               { | 
					
						
							|  |  |  |                 id: case_id, | 
					
						
							|  |  |  |                 name: '', | 
					
						
							|  |  |  |               }, | 
					
						
							| 
									
										
										
										
											2024-11-05 09:56:41 +08:00
										 |  |  |               ...draft._targetBranches.slice(elseCaseIndex), | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |             ]) | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleRemoveCase = useCallback((caseId: string) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       draft.cases = draft.cases?.filter(item => item.case_id !== caseId) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       if (draft._targetBranches) | 
					
						
							|  |  |  |         draft._targetBranches = branchNameCorrect(draft._targetBranches.filter(branch => branch.id !== caseId)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       handleEdgeDeleteByDeleteBranch(id, caseId) | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs, id, handleEdgeDeleteByDeleteBranch]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const handleSortCase = useCallback((newCases: (CaseItem & { id: string })[]) => { | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |       draft.cases = newCases.filter(Boolean).map(item => ({ | 
					
						
							|  |  |  |         id: item.id, | 
					
						
							|  |  |  |         case_id: item.case_id, | 
					
						
							|  |  |  |         logical_operator: item.logical_operator, | 
					
						
							|  |  |  |         conditions: item.conditions, | 
					
						
							|  |  |  |       })) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       draft._targetBranches = branchNameCorrect([ | 
					
						
							|  |  |  |         ...newCases.filter(Boolean).map(item => ({ id: item.case_id, name: '' })), | 
					
						
							|  |  |  |         { id: 'false', name: '' }, | 
					
						
							|  |  |  |       ]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							| 
									
										
										
										
											2024-08-15 17:26:11 +08:00
										 |  |  |     updateNodeInternals(id) | 
					
						
							| 
									
										
										
										
											2025-04-14 11:27:14 +08:00
										 |  |  |   }, [id, inputs, setInputs, updateNodeInternals]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const handleAddCondition = useCallback<HandleAddCondition>((caseId, valueSelector, varItem) => { | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) { | 
					
						
							|  |  |  |         targetCase.conditions.push({ | 
					
						
							|  |  |  |           id: uuid4(), | 
					
						
							|  |  |  |           varType: varItem.type, | 
					
						
							|  |  |  |           variable_selector: valueSelector, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |           comparison_operator: getOperators(varItem.type, getIsVarFileAttribute(valueSelector) ? { key: valueSelector.slice(-1)[0] } : undefined)[0], | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |           value: '', | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   }, [getIsVarFileAttribute, inputs, setInputs]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const handleRemoveCondition = useCallback<HandleRemoveCondition>((caseId, conditionId) => { | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) | 
					
						
							|  |  |  |         targetCase.conditions = targetCase.conditions.filter(item => item.id !== conditionId) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |   const handleUpdateCondition = useCallback<HandleUpdateCondition>((caseId, conditionId, newCondition) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) { | 
					
						
							|  |  |  |         const targetCondition = targetCase.conditions.find(item => item.id === conditionId) | 
					
						
							|  |  |  |         if (targetCondition) | 
					
						
							|  |  |  |           Object.assign(targetCondition, newCondition) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |   const handleToggleConditionLogicalOperator = useCallback<HandleToggleConditionLogicalOperator>((caseId) => { | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |         targetCase.logical_operator = targetCase.logical_operator === LogicalOperator.and ? LogicalOperator.or : LogicalOperator.and | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleAddSubVariableCondition = useCallback<HandleAddSubVariableCondition>((caseId: string, conditionId: string, key?: string) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const condition = draft.cases?.find(item => item.case_id === caseId)?.conditions.find(item => item.id === conditionId) | 
					
						
							|  |  |  |       if (!condition) | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       if (!condition?.sub_variable_condition) { | 
					
						
							|  |  |  |         condition.sub_variable_condition = { | 
					
						
							|  |  |  |           case_id: uuid4(), | 
					
						
							|  |  |  |           logical_operator: LogicalOperator.and, | 
					
						
							|  |  |  |           conditions: [], | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       const subVarCondition = condition.sub_variable_condition | 
					
						
							|  |  |  |       if (subVarCondition) { | 
					
						
							|  |  |  |         if (!subVarCondition.conditions) | 
					
						
							|  |  |  |           subVarCondition.conditions = [] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         subVarCondition.conditions.push({ | 
					
						
							|  |  |  |           id: uuid4(), | 
					
						
							|  |  |  |           key: key || '', | 
					
						
							|  |  |  |           varType: VarType.string, | 
					
						
							|  |  |  |           comparison_operator: undefined, | 
					
						
							|  |  |  |           value: '', | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleRemoveSubVariableCondition = useCallback((caseId: string, conditionId: string, subConditionId: string) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const condition = draft.cases?.find(item => item.case_id === caseId)?.conditions.find(item => item.id === conditionId) | 
					
						
							|  |  |  |       if (!condition) | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       if (!condition?.sub_variable_condition) | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |       const subVarCondition = condition.sub_variable_condition | 
					
						
							|  |  |  |       if (subVarCondition) | 
					
						
							|  |  |  |         subVarCondition.conditions = subVarCondition.conditions.filter(item => item.id !== subConditionId) | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleUpdateSubVariableCondition = useCallback<HandleUpdateSubVariableCondition>((caseId, conditionId, subConditionId, newSubCondition) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) { | 
					
						
							|  |  |  |         const targetCondition = targetCase.conditions.find(item => item.id === conditionId) | 
					
						
							|  |  |  |         if (targetCondition && targetCondition.sub_variable_condition) { | 
					
						
							|  |  |  |           const targetSubCondition = targetCondition.sub_variable_condition.conditions.find(item => item.id === subConditionId) | 
					
						
							|  |  |  |           if (targetSubCondition) | 
					
						
							|  |  |  |             Object.assign(targetSubCondition, newSubCondition) | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   const handleToggleSubVariableConditionLogicalOperator = useCallback<HandleToggleSubVariableConditionLogicalOperator>((caseId, conditionId) => { | 
					
						
							|  |  |  |     const newInputs = produce(inputs, (draft) => { | 
					
						
							|  |  |  |       const targetCase = draft.cases?.find(item => item.case_id === caseId) | 
					
						
							|  |  |  |       if (targetCase) { | 
					
						
							|  |  |  |         const targetCondition = targetCase.conditions.find(item => item.id === conditionId) | 
					
						
							|  |  |  |         if (targetCondition && targetCondition.sub_variable_condition) | 
					
						
							|  |  |  |           targetCondition.sub_variable_condition.logical_operator = targetCondition.sub_variable_condition.logical_operator === LogicalOperator.and ? LogicalOperator.or : LogicalOperator.and | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2024-05-27 21:57:08 +08:00
										 |  |  |     }) | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |     setInputs(newInputs) | 
					
						
							|  |  |  |   }, [inputs, setInputs]) | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   return { | 
					
						
							|  |  |  |     readOnly, | 
					
						
							|  |  |  |     inputs, | 
					
						
							|  |  |  |     filterVar, | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |     filterNumberVar, | 
					
						
							|  |  |  |     handleAddCase, | 
					
						
							|  |  |  |     handleRemoveCase, | 
					
						
							|  |  |  |     handleSortCase, | 
					
						
							|  |  |  |     handleAddCondition, | 
					
						
							|  |  |  |     handleRemoveCondition, | 
					
						
							|  |  |  |     handleUpdateCondition, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |     handleToggleConditionLogicalOperator, | 
					
						
							|  |  |  |     handleAddSubVariableCondition, | 
					
						
							|  |  |  |     handleUpdateSubVariableCondition, | 
					
						
							|  |  |  |     handleRemoveSubVariableCondition, | 
					
						
							|  |  |  |     handleToggleSubVariableConditionLogicalOperator, | 
					
						
							| 
									
										
										
										
											2024-07-10 18:20:13 +08:00
										 |  |  |     nodesOutputVars: availableVars, | 
					
						
							|  |  |  |     availableNodes: availableNodesWithParent, | 
					
						
							|  |  |  |     nodesOutputNumberVars: availableNumberVars, | 
					
						
							|  |  |  |     availableNumberNodes: availableNumberNodesWithParent, | 
					
						
							| 
									
										
										
										
											2024-10-21 10:32:37 +08:00
										 |  |  |     varsIsVarFileAttribute, | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default useConfig |