import React from 'react';
import PropTypes from 'prop-types';
import { columnType } from './types';
import * as constants from '../constants';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
/**
 * Form field wrapper for create/update page
 */
const FieldWrapperForCreateUpdatePage = ({
  column,
  children
}) => {
  const typeClassName = column.type === constants.STRING_ARRAY ? 'dbm-string-array-form-field' : 'dbm-string-form-field';
  return /*#__PURE__*/_jsxs("div", {
    // key={column.id}
    className: `dbm-form-field ${typeClassName}`,
    "data-debug": JSON.stringify(column),
    children: [/*#__PURE__*/_jsxs("div", {
      className: "dbm-field-label",
      children: [/*#__PURE__*/_jsx("b", {
        children: column.name
      }), ":", ' ']
    }), children]
  });
};
FieldWrapperForCreateUpdatePage.propTypes = {
  column: columnType.isRequired,
  // value: PropTypes.oneOfType([
  //   PropTypes.number,
  //   PropTypes.bool,
  //   PropTypes.string,
  //   PropTypes.arrayOf(PropTypes.string),
  // ]),
  children: PropTypes.node
};
FieldWrapperForCreateUpdatePage.defaultProps = {
  // value: '',
  children: null
};
// FieldWrapper2.contextType = PageContext;

export default FieldWrapperForCreateUpdatePage;
//# sourceMappingURL=FieldWrapperForCreateUpdatePage.js.map