import { ElementsNames } from 'client/Containers/Calculation/types/elements';
import { TElementFilter } from 'core/types/Calculation/Store/filters';

const initialFilters: Partial<Record<ElementsNames, TElementFilter>> = {
  selectSubsidy: subsidies =>
    subsidies.filter(x =>
      [100_000_000, 100_000_001].includes(x.evo_subsidy_type!),
    ),
  selectImportProgram: subsidies =>
    subsidies.filter(x => [100_000_002].includes(x.evo_subsidy_type!)),
};

export const noResetValueElements: ElementsNames[] = [
  'selectTechnicalCard',
  'selectTownRegistration',
];
export const autoSetValuesElements: ElementsNames[] = [
  'selectProduct',
  'selectLeaseObjectType',
  'selectBrand',
  'selectModel',
  'selectConfiguration',
  'selectTracker',
  'selectTelematic',
  'selectTechnicalCard',
  'selectFuelCard',
  'selectRegistration',
  'selectTownRegistration',
];

export default initialFilters;
