import { LeftToRightListBulletIcon } from '@zen/core/shared/icons';
import { newBlockId } from '../utils/ids.js';

const BulletItem = {
  type: 'bullet_item',
  label: 'Liste à puces',
  icon: <LeftToRightListBulletIcon width={18} height={18} />,
  keywords: ['liste', 'list', 'puce', 'bullet', 'ul'],
  shortcut: '- ',
  isText: true,
  textTag: 'li',
  textClassName: 'text-base leading-relaxed text-neutral-900 dark:text-white',
  placeholder: 'Élément de liste',
  renderPrefix() {
    return (
      <span
        aria-hidden
        className="select-none mt-[0.55em] mr-2 inline-block w-1.5 h-1.5 rounded-full bg-neutral-700 dark:bg-neutral-300 flex-shrink-0"
      />
    );
  },
  create(init = {}) {
    return { id: newBlockId(), type: 'bullet_item', content: [], ...init };
  },
};

export default BulletItem;
