import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {NodePickerComponent} from './editor/node-picker/node-picker.component';
import {IonicModule} from '@ionic/angular';
import {DatabaseComponent} from './editor/database/database.component';
import {AgGridModule} from 'ag-grid-angular';
import {ColumnsComponent} from './editor/database/columns/columns.component';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {ContenteditableModule} from '@ng-stack/contenteditable';
import {CodeComponent} from './editor/code/code.component';
import {MonacoEditorModule} from 'ngx-monaco-editor';
import {IonicSelectableModule} from 'ionic-selectable';
import {FilesComponent} from './editor/files/files.component';
import {OptionPickerComponent} from './option-picker/option-picker.component';
import {HostOptionsComponent} from './editor/host-options/host-options.component';
import {OptionMenuComponent} from './option-menu/option-menu.component';
import {SelectorComponent} from './sharing/selector/selector.component';
import {NumericEditorComponent} from './editor/database/editors/numeric/numeric-editor.component';
import {ParagraphEditorComponent} from './editor/database/editors/paragraph/paragraph-editor.component';
import {ParagraphModalComponent} from './editor/database/editors/paragraph/paragraph-modal.component';
import {BooleanEditorComponent} from './editor/database/editors/boolean/boolean-editor.component';
import {SelectEditorComponent} from './editor/database/editors/select/select-editor.component';
import {MultiSelectEditorComponent} from './editor/database/editors/select/multiselect-editor.component';
import {DatetimeEditorComponent} from './editor/database/editors/datetime/datetime-editor.component';
import {DatetimeRendererComponent} from './editor/database/renderers/datetime-renderer.component';
import {CurrencyRendererComponent} from './editor/database/renderers/currency-renderer.component';
import {BooleanRendererComponent} from './editor/database/renderers/boolean-renderer.component';
import {SearchComponent} from './search/Search.component';

import {NormComponent} from './nodes/norm/norm.component';
import {MarkdownComponent as MarkdownEditorComponent} from './nodes/markdown/markdown.component';
import {DirectivesModule} from '../directives/directives.module';
import {MarkdownModule} from 'ngx-markdown';
import {VersionModalComponent} from './version-modal/version-modal.component';
import {EditorPageRoutingModule} from '../pages/editor/editor-routing.module';
import {EditorPage} from '../pages/editor/editor.page';
import {WysiwygComponent} from './wysiwyg/wysiwyg.component';
import {WysiwygEditorComponent} from './editor/database/editors/wysiwyg/wysiwyg-editor.component';
import {WysiwygModalComponent} from './editor/database/editors/wysiwyg/wysiwyg-modal.component';
import {AngularResizedEventModule} from 'angular-resize-event';
import {DateTimeFilterComponent} from './editor/database/filters/date-time.filter';
import {DatabasePageComponent} from './editor/database/database-page.component';
import {PageLinkRendererComponent} from './editor/database/renderers/page-link-renderer.component';
import {PageLinkEditorComponent} from './editor/database/editors/page-link/page-link-editor.component';
import {LinkRendererComponent} from './editor/database/renderers/link-renderer.component';
import {FormInputComponent} from './nodes/form-input/form-input.component';
import {FormInputOptionsComponent} from './nodes/form-input/options/form-input-options.component';
import {DatabaseLinkComponent} from './editor/forms/database-link.component';
import {FileBoxComponent} from './nodes/file-box/file-box.component';
import {FileBoxPageComponent} from './nodes/file-box/file-box-page.component';

@NgModule({
  declarations: [
    NodePickerComponent,
    DatabaseComponent,
    ColumnsComponent,
    CodeComponent,
    FilesComponent,
    OptionPickerComponent,
    HostOptionsComponent,
    OptionMenuComponent,
    SelectorComponent,
    NumericEditorComponent,
    ParagraphEditorComponent,
    ParagraphModalComponent,
    BooleanEditorComponent,
    SelectEditorComponent,
    MultiSelectEditorComponent,
    DatetimeEditorComponent,
    DatetimeRendererComponent,
    CurrencyRendererComponent,
    BooleanRendererComponent,
    SearchComponent,

    NormComponent,
    MarkdownEditorComponent,
    VersionModalComponent,
    EditorPage,
    WysiwygComponent,
    WysiwygEditorComponent,
    WysiwygModalComponent,
    DateTimeFilterComponent,
    DatabasePageComponent,
    PageLinkRendererComponent,
    LinkRendererComponent,
    PageLinkEditorComponent,
    FormInputComponent,
    FormInputOptionsComponent,
    DatabaseLinkComponent,
    FileBoxComponent,
    FileBoxPageComponent,
  ],
  imports: [
    CommonModule,
    IonicModule,
    AgGridModule,
    FormsModule,
    ReactiveFormsModule,
    ContenteditableModule,
    MonacoEditorModule,
    DirectivesModule,
    MarkdownModule,
    EditorPageRoutingModule,
    AngularResizedEventModule,
    IonicSelectableModule,
  ],
  entryComponents: [
    NodePickerComponent,
    DatabaseComponent,
    ColumnsComponent,
    CodeComponent,
    FilesComponent,
    OptionPickerComponent,
    HostOptionsComponent,
    OptionMenuComponent,
    SelectorComponent,
    NumericEditorComponent,
    ParagraphEditorComponent,
    ParagraphModalComponent,
    BooleanEditorComponent,
    SelectEditorComponent,
    MultiSelectEditorComponent,
    DatetimeEditorComponent,
    DatetimeRendererComponent,
    CurrencyRendererComponent,
    BooleanRendererComponent,
    SearchComponent,

    NormComponent,
    MarkdownEditorComponent,
    VersionModalComponent,
    EditorPage,
    WysiwygComponent,
    WysiwygEditorComponent,
    WysiwygModalComponent,
    DateTimeFilterComponent,
    DatabasePageComponent,
    PageLinkRendererComponent,
    LinkRendererComponent,
    PageLinkEditorComponent,
    FormInputComponent,
    FormInputOptionsComponent,
    DatabaseLinkComponent,
    FileBoxComponent,
    FileBoxPageComponent,
  ],
  exports: [
    NodePickerComponent,
    DatabaseComponent,
    ColumnsComponent,
    CodeComponent,
    FilesComponent,
    OptionPickerComponent,
    HostOptionsComponent,
    OptionMenuComponent,
    SelectorComponent,
    NumericEditorComponent,
    ParagraphEditorComponent,
    ParagraphModalComponent,
    BooleanEditorComponent,
    SelectEditorComponent,
    MultiSelectEditorComponent,
    DatetimeEditorComponent,
    DatetimeRendererComponent,
    CurrencyRendererComponent,
    BooleanRendererComponent,
    SearchComponent,

    NormComponent,
    MarkdownEditorComponent,
    VersionModalComponent,
    EditorPage,
    WysiwygComponent,
    WysiwygEditorComponent,
    WysiwygModalComponent,
    DateTimeFilterComponent,
    DatabasePageComponent,
    PageLinkRendererComponent,
    LinkRendererComponent,
    PageLinkEditorComponent,
    FormInputComponent,
    FormInputOptionsComponent,
    DatabaseLinkComponent,
    FileBoxComponent,
    FileBoxPageComponent,
  ]
})
export class ComponentsModule {}
