import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';

import { COMPONENTS } from './component';
import { SERVICES } from './service';

@NgModule({
  imports: [],
  exports: []
})
export class AudioPlayerRootModule {}

@NgModule({
  declarations: [...COMPONENTS],
  imports: [CommonModule],
  exports: []
})
export class AudioPlayerModule {
  public static forRoot(): ModuleWithProviders<AudioPlayerRootModule> {
    return {
      ngModule: AudioPlayerRootModule,
      providers: [SERVICES]
    };
  }
}
