
import React 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 } = useGetCategories()
  const SelectData = useFormatToSelect(data?.categories)


  return (
    <Row xs={1} sm={1} md={1} lg={2} xl={2}>
      <Col>
        <ValidationField name="name_ar" />
        <ValidationField name="name_en" />
        <ValidationField name="name_de" />

      </Col>
      <Col>
        <ValidationField name="parent_id" type="Search" option={SelectData} searchBy={"search"} />
        <ValidationField name="photo" type="File" />
      </Col>



    </Row>
  )
}

export default Form


