/**
* Copyright (c) 2026-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { observer } from 'mobx-react-lite';
import { useEditorStore } from '../../EditorStoreProvider.js';
import {
type AppDirOwner,
type SnowflakeComputeSpecification,
AppDirLevel,
AppDirNode,
observe_AppDirNode,
} from '@finos/legend-graph';
import {
clsx,
CustomSelectorInput,
PanelContent,
PanelForm,
PanelFormBooleanField,
PanelFormSection,
PanelFormTextField,
PanelHeader,
} from '@finos/legend-art';
import { useApplicationStore } from '@finos/legend-application';
import {
ComputeEditorState,
applyOptionalInt,
} from '../../../../stores/editor/editor-state/element-editor-state/compute/ComputeEditorState.js';
import {
type ComputeEnumOption,
type ComputeFormDescriptor,
type ComputeFormField,
getVisibleComputeFormSections,
} from '../../../../stores/editor/editor-state/element-editor-state/compute/ComputeFormDescriptor.js';
import { SNOWFLAKE_COMPUTE_FORM_DESCRIPTOR } from '../../../../stores/editor/editor-state/element-editor-state/compute/SnowflakeComputeFormDescriptor.js';
import {
appDirNode_setAppDirId,
appDirOwner_setProdParallel,
appDirOwner_setProduction,
} from '../../../../stores/graph-modifier/DSL_Compute_GraphModifierHelper.js';
const NumberField = (props: {
name: string;
value: number | undefined;
errorMessage?: string | undefined;
isReadOnly: boolean;
onChange: (value: string) => void;
}): React.ReactElement => {
const { name, value, errorMessage, isReadOnly, onChange } = props;
return (