import { reactive, PropType } from 'vue';
import { PropTypes } from '/nerv-lib/util/type';

export const formProps = {
  params: PropTypes.object.def(() => ({})),
  showAction: PropTypes.bool.def(false),
  // validateState: PropTypes.bool.def(false),
  schemas: {
    type: Array as PropType<FormSchema[]>,
    required: true,
    default: () => [],
  },
  model: PropTypes.object.def(() => reactive({})),
  loading: PropTypes.bool.def(false),
  formLayout: PropTypes.string.def('flex'),
  expand: PropTypes.bool.def(true),
  showExpand: PropTypes.bool.def(false),
};
