import { fileTextIcon } from '@keystar/ui/icon/icons/fileTextIcon'
import { fields } from '@keystatic/core'
import { repeating, wrapper } from '@keystatic/core/content-components'

export const definitionListComponents = {
  DefinitionList: repeating({
    label: 'Definition List',
    icon: fileTextIcon,
    children: ['DefinitionItem'],
    schema: {},
  }),
  DefinitionItem: wrapper({
    label: 'Definition Item',
    forSpecificLocations: true,
    schema: {
      term: fields.text({ label: 'Term' }),
    },
  }),
}
