import type { UseFormReturn } from 'react-hook-form' import { Badge, FormControl, FormField, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import type { SupportFormValues } from './SupportForm.schema' import { getOrgSubscriptionPlan, NO_ORG_MARKER, NO_PROJECT_MARKER } from './SupportForm.utils' // End of third-party imports import { useOrganizationsQuery } from '@/data/organizations/organizations-query' interface OrganizationSelectorProps { form: UseFormReturn orgSlug: string | null } export function OrganizationSelector({ form, orgSlug }: OrganizationSelectorProps) { const { data: organizations, isSuccess: isSuccessOrganizations } = useOrganizationsQuery() const subscriptionPlanId = getOrgSubscriptionPlan(organizations, orgSlug) return ( { const { ref: _ref, ...fieldWithoutRef } = field return ( ) }} /> ) }