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

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

const nameSpace = slice.name;
const formSelectors = createFormSelector(REDUX_FIELD_NAME, nameSpace);

export const idSelector = (state) => state[nameSpace].id;
export const nameSelector = (state) => state[nameSpace].name;
export const salesforceIdSelector = (state) => state[nameSpace].salesforceId;
export const commentsSelector = (state) => state[nameSpace].comments;
export const playFromCoSelector = (state) => state[nameSpace].playFromCo;
export const callToActionSelector = (state) => state[nameSpace].callToAction;
export const accountSelector = (state) => state[nameSpace].account;
export const accountOptionsSelector = (state) => state[nameSpace].accountOptions;
export const typeSelector = (state) => state[nameSpace].type;
export const statusSelector = (state) => state[nameSpace].status;
export const isPublicSelector = (state) => state[nameSpace].isPublic;
export const feedPrioritySelector = (state) => state[nameSpace].feedPriority;
export const activeTabIdSelector = (state) => state[nameSpace].activeTabId;

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