import { type FC } from 'react'
import type { FormikProps } from 'formik'
import { Checkbox } from '@/components/ui/checkbox'
import type { CreateFoodType } from '../types/Types'

type ServiceOptionsSectionProps = {
  formik: FormikProps<CreateFoodType>
}

const ServiceOptionsSection: FC<ServiceOptionsSectionProps> = ({ formik }) => {
  return (
    <div className='mt-6'>
      <div className='text-sm mb-3'>گزینه‌های سرویس</div>
      <div className='flex gap-6 flex-wrap'>
        <div className='flex items-center gap-2'>
          <Checkbox
            checked={formik.values.pickupServe}
            onCheckedChange={(checked) => formik.setFieldValue('pickupServe', checked)}
          />
          <label className='text-xs cursor-pointer'> بیرون‌بر</label>
        </div>
        <div className='flex items-center gap-2'>
          <Checkbox
            checked={formik.values.inPlaceServe}
            onCheckedChange={(checked) => formik.setFieldValue('inPlaceServe', checked)}
          />
          <label className='text-xs cursor-pointer'>سرو در محل</label>
        </div>
      </div>
    </div>
  )
}

export default ServiceOptionsSection

