import { EnvEditor } from '../../../../components/EnvEditor';
import type { VariablesFormState } from '../hooks/useDeploymentPageState';

interface Props {
  value: VariablesFormState;
  onChange: (next: VariablesFormState) => void;
  disabled?: boolean;
}

export function VariablesTab({ value, onChange, disabled }: Props) {
  return (
    <EnvEditor
      value={value.envVars}
      onChange={(entries) => onChange({ envVars: entries })}
      disabled={disabled}
    />
  );
}
