export const stringToInt = (value: string | undefined) => {
  try {
    if (!value) return undefined;
    const floatValue = parseFloat(value);
    if (isNaN(floatValue)) return undefined;
    return floatValue;
  } catch {
    return undefined;
  }
};
