const SYSTEM_FIELD_NAMES = ["id", "createdAt", "updatedAt", "userId", "teamId"];
const IMPLICIT_SORTABLE_FIELDS = ["createdAt", "updatedAt"];
const SYSTEM_TIMESTAMP_FIELDS = [
  {
    name: "createdAt",
    type: "datetime",
    required: false,
    display: {
      label: "Created At",
      description: "When this record was created",
      showInList: false,
      showInDetail: true,
      showInForm: false,
      order: 998
    },
    api: {
      readOnly: true,
      searchable: false,
      sortable: true
    }
  },
  {
    name: "updatedAt",
    type: "datetime",
    required: false,
    display: {
      label: "Updated At",
      description: "When this record was last modified",
      showInList: false,
      showInDetail: true,
      showInForm: false,
      order: 999
    },
    api: {
      readOnly: true,
      searchable: false,
      sortable: true
    }
  }
];
function isSystemField(fieldName) {
  return SYSTEM_FIELD_NAMES.includes(fieldName);
}
function isImplicitTimestampField(fieldName) {
  return IMPLICIT_SORTABLE_FIELDS.includes(fieldName);
}
function getSystemTimestampField(fieldName) {
  return SYSTEM_TIMESTAMP_FIELDS.find((f) => f.name === fieldName) || null;
}
const BUILDER_SYSTEM_FIELD_NAMES = ["blocks"];
const BUILDER_BLOCKS_FIELD = {
  name: "blocks",
  type: "json",
  required: false,
  defaultValue: [],
  display: {
    label: "Blocks",
    description: "Content blocks (managed by builder)",
    showInList: false,
    showInDetail: false,
    showInForm: false,
    order: 100
  },
  api: {
    searchable: false,
    sortable: false,
    readOnly: false
  }
};
function isBuilderSystemField(fieldName) {
  return BUILDER_SYSTEM_FIELD_NAMES.includes(fieldName);
}
export {
  BUILDER_BLOCKS_FIELD,
  BUILDER_SYSTEM_FIELD_NAMES,
  IMPLICIT_SORTABLE_FIELDS,
  SYSTEM_FIELD_NAMES,
  SYSTEM_TIMESTAMP_FIELDS,
  getSystemTimestampField,
  isBuilderSystemField,
  isImplicitTimestampField,
  isSystemField
};
