<script>
import { ref, computed } from 'vue';
import { columnTypes } from "@/components/forms/other/types/dataColumnsType.vue";

const defaultColumnProperties = {
  type: columnTypes.string,
  required: false,
  defaultValue: null,
  label: undefined,
};

export const availableColumnProperties = {
  type: {
    type: String,
    default: defaultColumnProperties.type,
  },
  required: {
    type: Boolean,
    default: defaultColumnProperties.required,
  },
  defaultValue: {
    type: [String, Number, Boolean, Object],
    default: defaultColumnProperties.defaultValue,
  },
};

export const applyColumnProperties = (properties) => {
  return { ...defaultColumnProperties, ...properties };
}
</script>