import { Actions } from '@ngrx/effects';
import { State } from 'app';
import { ImageConfig, ImageOptions } from 'ash/image';
import { IMAGE_OPTIONS, ImageModule } from 'ash/image/module';
import { ImageService } from 'ash/image/services/main';
import { ImageStaticService } from 'ash/image/services/static';
import { ImageActions } from 'ash/image/store/actions';

export function imageService( actions: ImageActions, actions$: Actions, options: ImageOptions, store: Store<State> ): ImageService {
  return new ImageStaticService( actions, actions$, options, store );
}

export const imageConfig: ImageConfig = {
  options: { dir: '/assets/images', preload: 'preload', thumbSuffix: '480x360' },
  provider: {
    deps: [ ImageActions, Actions, IMAGE_OPTIONS, Store ],
    provide: ImageService,
    useFactory: imageService,
  },
};
import { Store } from '@ngrx/store';
