
import React from 'react'
import { Col, Row } from 'reactstrap';
import ValidationField from '../../../../Components/ValidationField/ValidationField';
import { useFormikContext } from 'formik';

import { DatePicker } from 'antd';
import { useTranslation } from 'react-i18next';
import { useGetCategories } from '../../../../api/Categories';
import useFormatToSelect from '../../../../Hooks/useFormatToSelect';
import { useGetOneAttribute } from '../../../../api/attribute';
import Atteibute from '../Atteibute';

function Form() {
  const formik = useFormikContext<any>();
  const [t] = useTranslation();
  const { data } = useGetCategories()
  const SelectData = useFormatToSelect(data?.categories)
  const { values } = useFormikContext<any>();


  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" />
      {/* <ObjectField/> */}
        {/* {values?.id &&
          <Atteibute  />
        } */}
      </Col>



    </Row>
  )
}

export default Form


