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 hubSelector = (state) => state[nameSpace].hub;
export const hubOptionsSelector = (state) => state[nameSpace].hubOptions;
export const nameSelector = (state) => state[nameSpace].name;
export const titleSelector = (state) => state[nameSpace].title;
export const imageSelector = (state) => state[nameSpace].image;
export const buttonLabel1Selector = (state) => state[nameSpace].buttonLabel1;
export const buttonUrl1Selector = (state) => state[nameSpace].buttonUrl1;
export const buttonLabel2Selector = (state) => state[nameSpace].buttonLabel2;
export const buttonUrl2Selector = (state) => state[nameSpace].buttonUrl2;
export const impressionTrackerSelector = (state) => state[nameSpace].impressionTracker;
export const clickTracker1Selector = (state) => state[nameSpace].clickTracker1;
export const clickTracker2Selector = (state) => state[nameSpace].clickTracker2;

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];
