import { FormControl, FormField, FormItem, FormLabel, FormMessage, ToggleGroup, ToggleGroupItem, ScrollArea } from '@marzneshin/components'; import { useServicesQuery } from '@marzneshin/features/services'; import { ServiceCard } from '@marzneshin/features/users'; import { FC } from 'react' import { useFormContext } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; interface ServicesFieldProps { services: number[] setServices: (s: number[]) => void } export const ServicesField: FC = ({ services, setServices }) => { const form = useFormContext(); const { data } = useServicesQuery({ page: 1, size: 100 }); const { t } = useTranslation(); const handleToggle = (selectedServiceIds: string[]) => { setServices(selectedServiceIds.map(Number)); }; return ( ( {t('services')} {data.entity.map(service => ( ))} )} /> ); };