import { UseFormReturn } from 'react-hook-form'
import {
FormControl,
FormField,
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
useWatch,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { CreateProjectForm } from './ProjectCreation.schema'
import { useCustomContent } from '@/hooks/custom-content/useCustomContent'
import { PROVIDERS } from '@/lib/constants'
const HA_SUPPORTED_PROVIDERS = ['AWS_K8S']
interface CloudProviderSelectorProps {
form: UseFormReturn
}
export const CloudProviderSelector = ({ form }: CloudProviderSelectorProps) => {
const { infraCloudProviders: validCloudProviders } = useCustomContent(['infra:cloud_providers'])
const highAvailability = useWatch({ control: form.control, name: 'highAvailability' })
return (
(
High availability is only supported on AWS (Revamped)
) : (
'Select which cloud provider to spin up project from'
)
}
>
)}
/>
)
}