import React from 'react' import type { CreateInstanceOptions } from '@/types/instance' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Label } from '@/components/ui/label' import { Input } from '@/components/ui/input' import AutoRestartConfiguration from '@/components/instance/AutoRestartConfiguration' import NumberInput from '@/components/form/NumberInput' import CheckboxInput from '@/components/form/CheckboxInput' import EnvironmentVariablesInput from '@/components/form/EnvironmentVariablesInput' interface InstanceSettingsCardProps { instanceName: string nameError: string isEditing: boolean formData: CreateInstanceOptions onNameChange: (name: string) => void onChange: (key: keyof CreateInstanceOptions, value: unknown) => void } const InstanceSettingsCard: React.FC = ({ instanceName, nameError, isEditing, formData, onNameChange, onChange }) => { return ( Instance Settings {/* Instance Name */}
onNameChange(e.target.value)} placeholder="my-instance" disabled={isEditing} className={nameError ? "border-red-500" : ""} /> {nameError &&

{nameError}

}

Unique identifier for the instance

{/* Auto Restart Configuration */} {/* Basic Instance Options */}

Basic Instance Options

onChange('idle_timeout', value)} placeholder="30" description="Minutes before stopping an idle instance" /> onChange('on_demand_start', value)} description="Start instance only when needed" /> onChange('environment', value)} description="Custom environment variables for the instance" />
) } export default InstanceSettingsCard