import NoteIcon from '../../components/Icons/NoteIcon'
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'

export const Note = {
  name: 'note',
  label: 'Note',
  prefix: 'NTE',
  icon: NoteIcon,
  actions: [
    {
      name: 'info',
      label: 'Info',
      default: true,
      row: true,
      icon: InfoCircleIcon,
      url: (_id) => `/dashboard/management/notes/info?noteId=${_id}`
    }
  ],
  properties: [
    {
      name: '_id',
      label: 'ID',
      type: 'id',
      objectType: 'note',
      showCopy: true
    },
    {
      name: 'createdAt',
      label: 'Created At',
      type: 'dateTime',
      readOnly: true
    },
    {
      name: 'parent._id',
      label: 'Parent ID',
      type: 'id',
      objectType: (objectData) => {
        return objectData.parentType
      },
      showHyperlink: true,
      required: true
    },
    {
      name: 'content',
      label: 'Content',
      type: 'markdown',
      required: true,
      span: 2
    },
    {
      name: 'noteType',
      label: 'Note Type',
      type: 'object',
      objectType: 'noteType',
      showHyperlink: true,
      required: true
    },
    {
      name: 'noteType._id',
      label: 'Note Type ID',
      type: 'id',
      objectType: 'noteType'
    },
    {
      name: 'user._id',
      label: 'User ID',
      type: 'id',
      objectType: 'user'
    },
    {
      name: 'updatedAt',
      label: 'Updated At',
      type: 'dateTime',
      readOnly: true
    }
  ]
}
