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

function Form() {
  const {data:Categories} = useGetCategories()
  const SelectCategoriesData = useFormatToSelect(Categories?.data)
  

  return (
    <Row xs={1} sm={1} md={1} lg={2} xl={2}>
      <Col>
        <ValidationField name="name" />
        <ValidationField name="categories_id" type='Select' option={SelectCategoriesData} />
        <ValidationField type='number' name="price" />
        <ValidationField name="description" type='TextArea' />

      </Col>
      <Col>

    <ValidationField type='MaltyFile' name='images'  />
    <ValidationField type='File' name='video'  acceptedFileType='.mp4' />



      </Col>



    </Row>
  )
}

export default Form




