export const TARIFA_MINIMA = 80;
export const TARIFA_VARIACION = 0.3;

export const getRangoTarifa = (base: number | string | null | undefined) => {
  const precio = Number(base) || 0;
  if (precio <= 0) return null;
  const min = Math.max(TARIFA_MINIMA, Math.ceil(precio * (1 - TARIFA_VARIACION)));
  const max = Math.max(min, Math.floor(precio * (1 + TARIFA_VARIACION)));
  return { min, max };
};
