// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import {
  JupyterLabPlugin
} from '../application';

import {
  DocumentRegistry, IDocumentRegistry, TextModelFactory, Base64ModelFactory
} from './index';


/**
 * The default document registry provider.
 */
export
const docRegistryProvider: JupyterLabPlugin<IDocumentRegistry> = {
  id: 'jupyter.services.document-registry',
  provides: IDocumentRegistry,
  activate: (): IDocumentRegistry => {
    let registry = new DocumentRegistry();
    registry.addModelFactory(new TextModelFactory());
    registry.addModelFactory(new Base64ModelFactory());
    registry.addFileType({
      name: 'Text',
      extension: '.txt',
      fileType: 'file',
      fileFormat: 'text'
    });
    registry.addCreator({
      name: 'Text File',
      fileType: 'file',
    });
    return registry;
  }
};

// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import {
  JupyterLabPlugin
} from '../application';

import {
  DocumentRegistry, IDocumentRegistry, TextModelFactory, Base64ModelFactory
} from './index';


/**
 * The default document registry provider.
 */
export
const docRegistryProvider: JupyterLabPlugin<IDocumentRegistry> = {
  id: 'jupyter.services.document-registry',
  provides: IDocumentRegistry,
  activate: (): IDocumentRegistry => {
    let registry = new DocumentRegistry();
    registry.addModelFactory(new TextModelFactory());
    registry.addModelFactory(new Base64ModelFactory());
    registry.addFileType({
      name: 'Text',
      extension: '.txt',
      fileType: 'file',
      fileFormat: 'text'
    });
    registry.addCreator({
      name: 'Text File',
      fileType: 'Text',
    });
    return registry;
  }
};

Fix the text file creator
Fix the text file creator
