import { PeritextEventDefaults } from './defaults/PeritextEventDefaults';
import { PeritextEventTarget } from './PeritextEventTarget';
import { DomClipboard } from './clipboard/DomClipboard';
import { create as createDataTransfer } from '../../../json-crdt-extensions/peritext/transfer/create';
/**
 * @todo Move into separately importable file.
 * @todo Rename to `createDefaults`.
 */
export const createEvents = (txt) => {
    const et = new PeritextEventTarget();
    const clipboard = typeof navigator === 'object' && navigator && navigator.clipboard
        ? new DomClipboard(navigator.clipboard)
        : undefined;
    const transfer = createDataTransfer(txt);
    const defaults = new PeritextEventDefaults(txt, et, { clipboard, transfer });
    et.defaults = defaults;
    return defaults;
};
export * from './types';
//# sourceMappingURL=index.js.map