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,  
    DownloadKey:state.projectR.DownloadKey,
    ShowDBPOSM:state.projectR.ShowDBPOSM,  
    ShowNPND:state.projectR.ShowNPND, 
    ShowImageAudit:state.projectR.ShowImageAudit, 
    ManagerAppConfig:state.projectR.ManagerAppConfig,

    ShowNPNDLabel:state.projectR.ShowNPNDLabel,

    imageUploadUrl:state.projectR.imageUploadUrl,  
    GeoFenceEnable:state.projectR.GeoFenceEnable,
    GeoFenceRadius:state.projectR.GeoFenceRadius,
    GFEnable_checkout:state.projectR.GFEnable_checkout,
    SUP_StorewisePJP:state.projectR.SUP_StorewisePJP,
    SUP_ManagerDesigList:state.projectR.SUP_ManagerDesigList,
    GFRadius_checkout:state.projectR.GFRadius_checkout,
    CheckOut_PhotoReq:state.projectR.CheckOut_PhotoReq,
    
    companylogo:state.projectR.companylogo, 
    splashlogo:state.projectR.splashlogo,
    drawerlogo:state.projectR.drawerlogo,

    OQAD_TimeOut:state.projectR.OQAD_TimeOut,
    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,
    Clear_storage:state.projectR.Clear_storage,
    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,
    isAttendanceMarked:state.globalR.isAttendanceMarked,
    isEntryAllow:state.globalR.isEntryAllow,
    AppDashboardReports:state.projectR.AppDashboardReports, // new
    Show_OldMTDReports:state.projectR.Show_OldMTDReports,
    ShowDashboard:state.projectR.ShowDashboard,

    ShowStoreSearch:state.projectR.ShowStoreSearch, // store serach wise
    ShowStoreSearchLabel:state.projectR.ShowStoreSearchLabel,

    // 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_project_config:(pdata)=>dispatch({type:'SETPROJECTCONFIG',data:pdata}),

        set_DashboardReports:(data)=>dispatch({type:'SET_DASHBOARD_REPORTS',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}),
        setAttendanceStatus:(data)=>dispatch({type:'SET_ATTENDANCE_STATUS',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}),
        
        // setStorePhotosDone:(data)=>dispatch({type:'STORE_PHOTOS_DONE',data:data}),
    }
} 