
import React, { useEffect } from 'react'
import { Col, Row } from 'reactstrap';
import ValidationField from '../../../Components/ValidationField/ValidationField';
import {  useGetRestaurant } from '../../../api/Restaurant';
import useFormatToSelect from '../../../Hooks/useFormatToSelect';

function Form() {
  const {data:Restaurant} = useGetRestaurant()
  const SelectRestaurantData = useFormatToSelect(Restaurant?.data)
  

  return (
    <Row xs={1} sm={1} md={1} lg={2} xl={2}>
      <Col>
        <ValidationField name="name" />
        <ValidationField name="restaurant_id" type='Select' option={SelectRestaurantData} />

      </Col>
      <Col>

    <ValidationField type='File' name='image'  />


      </Col>



    </Row>
  )
}

export default Form




