import { REDUX_FIELD_NAME } from '../../constants';

import { slice } from '../slices';
import createFormSelector from '@/modules/@common/Form/redux/selectors';

const nameSpace = slice.name;

export const accountSelector = (state) => state[nameSpace].account;
export const accountOptionsSelector = (state) => state[nameSpace].accountOptions;

export const publisherIdsSelector = (state) => state[nameSpace].publisherIds;

export const lookerReportIdSelector = (state) => state[nameSpace].lookerReportId;
export const uiNameSelector = (state) => state[nameSpace].uiName;
export const descriptionSelector = (state) => state[nameSpace].description;
export const enabledSelector = (state) => state[nameSpace].enabled;
export const iconSelector = (state) => state[nameSpace].icon;
export const allSitesSelector = (state) => state[nameSpace].allSites;

export const activeTabIdSelector = (state) => state[nameSpace].activeTabId;

const formSelectors = createFormSelector(REDUX_FIELD_NAME, nameSpace);

export const scrollFieldSelector = (state) => formSelectors.getScrollField(state);
export const schemeSelector = (state) => formSelectors.schemeSelector(state);
export const fullAccessToStoreFieldsForValidation = (state) => state[nameSpace];
