import React from 'react';

export const mapStateToProps = (state) => ({
    projectID: state.projectR.projectID,
    projectName: state.projectR.projectName,
    projectCode: state.projectR.projectCode,
    projectData: state.projectR.projectData,
    baseurl: state.projectR.baseurl,
    imageUploadUrl: state.projectR.imageUploadUrl,
    GeoFenceEnable: state.projectR.GeoFenceEnable,
    GeoFenceRadius: state.projectR.GeoFenceRadius,
    GFEnable_checkout: state.projectR.GFEnable_checkout,
    GFRadius_checkout: state.projectR.GFRadius_checkout,
    CheckOut_PhotoReq: state.projectR.CheckOut_PhotoReq,

    DBCI_GeoFenceEnable: state.projectR.DBCI_GeoFenceEnable,
    DBCI_GeoFenceRadius: state.projectR.DBCI_GeoFenceRadius,
    DBCO_GeoFenceEnable: state.projectR.DBCO_GeoFenceEnable,
    DBCO_GeoFenceRadius: state.projectR.DBCO_GeoFenceRadius,

    CameraGallery: state.projectR.CameraGallery,
    CheckInCameraGallery: state.projectR.CheckInCameraGallery,
    DownloadKey: state.projectR.DownloadKey,
    OQAD_TimeOut: state.projectR.OQAD_TimeOut,
    ShowMenuType: state.projectR.ShowMenuType,
    ShowStoreChecklist: state.projectR.ShowStoreChecklist,
    RefImagePopUpTime: state.projectR.RefImagePopUpTime,
    AdhocActivated: state.projectR.AdhocActivated,

    ShowBeatPlanList: state.projectR.ShowBeatPlanList,
    ShowContractForm: state.projectR.ShowContractForm,
    WarehouseShow: state.projectR.WarehouseShow,
    Show_OldMTDReports: state.projectR.Show_OldMTDReports,
    ShowDBPOSM: state.projectR.ShowDBPOSM,
    ShowStoreAdd: state.projectR.ShowStoreAdd,
    ShowStoreProfile: state.projectR.ShowStoreProfile,
    ShowReportAfterCheckIn: state.projectR.ShowReportAfterCheckIn,
    //arman
    ShowCompactStoreProfile: state.projectR.ShowCompactStoreProfile,

    ShowNonMerList: state.projectR.ShowNonMerList,
    Show_VisitorFeedBack: state.projectR.Show_VisitorFeedBack,
    Show_ConsumerSection: state.projectR.Show_ConsumerSection,
    // state.projectR.Show_ConsumerSection,
    Clear_storage: state.projectR.Clear_storage,
    ShowNonProgram: state.projectR.ShowNonProgram,

    StoreChecklistOnce: state.projectR.StoreChecklistOnce,
    Gyancast: state.projectR.Gyancast,
    WebViewDashboard: state.projectR.WebViewDashboard,
    Chatbot: state.projectR.Chatbot,
    StoreMapView: state.projectR.StoreMapView,
    StoreRouteView: state.projectR.StoreRouteView,
    NoCheckIn_Photo: state.projectR.NoCheckIn_Photo,

    FaceRecognition: state.projectR.FaceRecognition,
    ShowStoreSearch: state.projectR.ShowStoreSearch,
    PartialSaveAllow: state.projectR.PartialSaveAllow,
    NonProgramLabel: state.projectR.NonProgramLabel,
    ShowStoreSearchLabel: state.projectR.ShowStoreSearchLabel,
    ShowStoreSearchLabel: state.projectR.ShowStoreSearchLabel,
    CheckinOpenBackCamera: state.projectR.CheckinOpenBackCamera,
    CheckoutOpenBackCamera: state.projectR.CheckoutOpenBackCamera,
    CheckInSwitchingCamera: state.projectR.CheckInSwitchingCamera,
    IR_CameraEnableOnApp: state.projectR.IR_CameraEnableOnApp,
    IR_Creds: state.projectR.IR_Creds,
    Chatbot_Creds: state.projectR.Chatbot_Creds,
    ShowAddNewStore: state.projectR.ShowAddNewStore,
    ShowSideMenuKYC: state.projectR.ShowSideMenuKYC,
    AddNewStoreInJCP: state.projectR.AddNewStoreInJCP,
    AddNewStoreVerificationReq: state.projectR.AddNewStoreVerificationReq,
    companylogo: state.projectR.companylogo,
    splashlogo: state.projectR.splashlogo,
    drawerlogo: state.projectR.drawerlogo,
    AppDashboardReports: state.projectR.AppDashboardReports,
    GroomingObj: state.projectR.GroomingObj,
    pPAYObj: state.projectR.pPAYObj,
    
    AppDashboardWebViewObj: state.projectR.AppDashboardWebViewObj,
    islogin: state.sessionR.islogin,
    firsttime: state.sessionR.firsttime,
    securityToken: state.sessionR.securityToken,
    mpin: state.sessionR.mpin,
    sessionData: state.sessionR.sessionData,
    UserId: state.sessionR.UserId,
    session_name: state.sessionR.session_name,
    DarkMode: state.themeR.DarkMode,
    PageTheme: state.themeR.PageTheme,
    customStyle: state.themeR.customStyle,
    globalStyle: state.themeR.globalStyle,
    customeButtonStyle: state.themeR.customeButtonStyle,
    ModalStyle: state.themeR.ModalStyle,
    isDataDownloaded: state.globalR.isDataDownloaded,
    startDownload: state.globalR.startDownload,
    startUpload: state.globalR.startUpload,
    isInternetAvailable: state.globalR.isInternetAvailable,
    showConnChange: state.globalR.showConnChange,
    AutoGoToPrev: state.globalR.AutoGoToPrev,
    StaticText: state.globalR.StaticText,
    isTodayLoginExists: state.globalR.isTodayLoginExists,
    isTodayDataDownloaded: state.globalR.isTodayDataDownloaded,
    AllKPIDisable: state.globalR.AllKPIDisable,
    VisitDate: state.sessionR.VisitDate,
    Allow_Change_Password: state.projectR.Allow_Change_Password,
    forget_Password_on_LoginPage: state.projectR.forget_Password_on_LoginPage,
    // notifications
    badgeCount: state.notificationR.badgeCount,
    notifications: state.notificationR.notifications
    // StorePhotosDone:state.globalR.StorePhotosDone,

}

);


export const mapDispatchToProps = (dispatch) => {
    return {
        get_project: () => dispatch({ type: 'GETPROJECT' }),
        set_project: (pdata) => dispatch({ type: 'SETPROJECT', data: pdata }),
        get_session: () => dispatch({ type: 'GETSESSION' }),
        set_session: (data) => dispatch({ type: 'SETSESSION', data: data }),
        set_DashboardReports: (data) => dispatch({ type: 'SET_DASHBOARD_REPORTS', data: data }),
        set_GroomingObj: (data) => dispatch({ type: 'SET_GROOMING_OBJ', data: data }),
        set_pPAYObj: (data) => dispatch({ type: 'SET_PPAY_OBJ', data: data }),

        set_AppDashboardWebViewObj: (data) => dispatch({ type: 'SET_AppDashboardWebView_OBJ', data: data }),

        set_user_details: (data) => dispatch({ type: 'SET_USER_DETAILS', data: data }),
        set_mpin: (data) => dispatch({ type: 'SET_MPIN', data: data }),
        setTheme: (DarkMode) => dispatch({ type: 'SET_THEME', DarkMode: DarkMode }),
        setThemeStyles: (pT, cS, gS, mS, cbS) => dispatch({ type: 'SET_THEME_STYLES', PageTheme: pT, customStyle: cS, globalStyle: gS, ModalStyle: mS, customeButtonStyle: cbS }),
        setGlobalData: (data) => dispatch({ type: 'SET_GLOBAL_DATA', data: data }),
        set_startDownload: (data) => dispatch({ type: 'START_DOWNLOAD', data: data }),
        set_startUpload: (data) => dispatch({ type: 'START_UPLOAD', data: data }),
        set_networkStatus: (data) => dispatch({ type: 'SET_NETWORK', data: data }),
        show_ConnChange: (data) => dispatch({ type: 'SHOW_CONCHANGE', data: data }),
        set_autoback: (data) => dispatch({ type: 'AUTO_BACK', data: data }),
        setStaticText: (data) => dispatch({ type: 'SET_STATIC_TEXT', data: data }),
        setLoginExists: (data) => dispatch({ type: 'SET_LOGIN_EXISTS', data: data }),
        setTodayDataExists: (data) => dispatch({ type: 'SET_TODAY_DATA_EXISTS', data: data }),
        set_AllKPIDisable: (data) => dispatch({ type: 'ALLKPIDISABLE', data: data }),
        set_VisitDate: (data) => dispatch({ type: 'VISITDATE', data: data }),
        // for notification
        get_badgecount: () => dispatch({ type: 'GET_BADGE_COUNT' }),
        set_badgecount: (data) => dispatch({ type: 'SET_BADGE_COUNT', data: data }),
        get_notificationlist: () => dispatch({ type: 'GET_NOTIFICATIONS' }),
        set_notificationlist: (data) => dispatch({ type: 'SET_NOTIFICATIONS', data: data }),
    }
} 