import type { RootState } from "@/store/store";


/**
 * REGLEMENT
 */
export const getAllReglements = (state: RootState) => state.reglement.reglements;
export const getreglementSelected = (state: RootState) => state.reglement.reglementSelected;


/**
 * STATISTIQUE
 */
export const getReglementStats = (state: RootState) => state.reglement.statistiques;


/**
 * MODES
 */
export const getAllModes = (state: RootState) => state.reglement.modes;
export const getModeSelected = (state: RootState) => state.reglement.modeSelected;

/**
 * DEVISES
 */
export const getAllDevises = (state: RootState) => state.reglement.devises;
export const getDeviseSelected = (state: RootState) => state.reglement.deviseSelected;

/**
 * TRÉSORERIES
 */
export const getAllTresoreries = (state: RootState) => state.reglement.tresoreries;
export const getTresorerieSelected = (state: RootState) =>
  state.reglement.tresorerieSelected;

/**
 * COMPTES GÉNÉRAUX
 */
export const getAllCompteGeneraux = (state: RootState) =>
  state.reglement.CompteGeneraux;
export const getCompteGenerauxSelected = (state: RootState) =>
  state.reglement.CompteGenerauxSelected;


/**
 * TAUX
 */
export const getAllTaux = (state: RootState) => state.reglement.taux;
export const getTauxSelected = (state: RootState) => state.reglement.tauxSelected;

/**
 * ENCAISSEMENTS
 */
export const getAllEncaissements = (state: RootState) =>  state.reglement.encaissements;

/**
 * GLOBAL
 */
export const reglementStatus = (state: RootState) => state.reglement.status;
export const reglementError = (state: RootState) => state.reglement.error;