import { all } from 'redux-saga/effects';
import CapCollapsibleLeftNavigationSagas from '@capillarytech/cap-ui-library/CapCollapsibleLeftNavigation/saga';
import { analyticsBotSaga } from '@capillarytech/cap-ui-library/CapAskAira';

export default [
  {
    key: 'navigation',
    saga: function* navigationConfigSaga() {
      yield all(CapCollapsibleLeftNavigationSagas.map((saga) => saga.call()));
    },
  },
  {
    key: 'analyticsBotSaga',
    saga: function* analyticsBotSagaFn() {
      if (analyticsBotSaga && Array.isArray(analyticsBotSaga)) {
        yield all(analyticsBotSaga.map((saga) => saga.call()));
      }
    },
  },
];
