import { ofType } from 'redux-observable';
import { concat, of } from 'rxjs';
import { switchMap } from 'rxjs/operators';

import { showUploaderAction } from '../slices';
import { isOpenAction as isOpenActionNew } from '@/modules/uploaderNew/redux/slices';

export default (action$) =>
  action$.pipe(
    ofType(showUploaderAction.type),
    switchMap(() => concat(of(isOpenActionNew(true)))),
  );
