import { RPCClientError } from '@loafer/ng-rpc';

import { Selector, createSelector } from '@ngrx/store';
import { createEntityAdapter, EntityState } from '@loafer/ng-entity';
import { MetaCrawler, MetaCrawlerInputItem } from '@overflow/commons-typescript/model/meta';

export const metaCrawlerInputItemEntityAdapter = createEntityAdapter<MetaCrawlerInputItem, RPCClientError>();
export interface State extends EntityState<MetaCrawlerInputItem, RPCClientError> {
}
export const initialState: State = metaCrawlerInputItemEntityAdapter.getInitialState({
});

export function getSelectors(selector: Selector<any, State>) {
  return {
    ...metaCrawlerInputItemEntityAdapter.getSelectors(selector),
  };
}
