
import React from 'react'
import { Col, Row } from 'reactstrap';
import { FakeSelectData } from '../../Layout/app/Const';
import { useFormikContext } from 'formik';

import { DatePicker } from 'antd';
import ValidationField from '../../Components/ValidationField/ValidationField';

function FormStaticInfo({ isDisable = false }: { isDisable?: boolean }) {
  const formik = useFormikContext<any>();

  const valueTypeArray = [
    { valueType: "string", id: "string" },
    { valueType: "image", id: "image" },
  ];

  const valueTypeOptions = valueTypeArray?.map((e: any) => ({
    label: e?.valueType,
    value: e?.id
  }))

  return (
    <Row xs={1} sm={1} md={1} lg={2} xl={2}>
      <Col>
        {/* name from form utils */}
        <ValidationField name="key" type="text" label='key' isDisabled={isDisable ? true : false} placeholder='placeholder' />

      </Col>
      <Col>
        <ValidationField name="value_type" option={valueTypeOptions || []} type="Select" label='value_type' placeholder='placeholder' />

        <ValidationField name="value" type={formik?.values?.value_type == 'image' ? 'File' : 'text'} label='value' placeholder='placeholder' />

      </Col>


    </Row>
  )
}

export default FormStaticInfo


