const isoDateString = '2026-01-20T01:30:43.776Z';
const isoDate = new Date(isoDateString);

export const safeParseFixtures = {
  toSafeString: {
    nullInput: null,
    undefinedInput: undefined,
    fallback: 'fallback',
    expectedEmpty: '',
    stringInput: 'hello',
    numberInput: 123,
    booleanInput: true,
    bigintInput: 10n,
    dateInput: isoDate,
    dateExpected: isoDateString,
    objectInput: { a: 1 },
    objectFallback: 'x',
  },
  toSafeIsoDateOrNull: {
    nullInput: null,
    undefinedInput: undefined,
    dateInput: isoDate,
    dateExpected: isoDateString,
    stringInput: '2026-01-20',
    stringExpected: '2026-01-20',
    numberInput: 123,
  },
  toSafeStringOrNull: {
    nullInput: null,
    undefinedInput: undefined,
    trimmedInput: '  hello  ',
    trimmedExpected: 'hello',
    emptyInput: '',
    whitespaceInput: '   ',
  },
  toSafeNumberOrNull: {
    nullInput: null,
    undefinedInput: undefined,
    numberInput: 12,
    numberExpected: 12,
    negativeInput: -3.5,
    negativeExpected: -3.5,
    nanInput: Number.NaN,
    numericStringInput: '42',
    numericStringExpected: 42,
    floatStringInput: '3.14',
    floatStringExpected: 3.14,
    invalidStringInput: 'x',
  },
  toSafeIntOrNull: {
    nullInput: null,
    undefinedInput: undefined,
    floatInput: 3.7,
    floatExpected: 3,
    negativeFloatInput: -2.9,
    negativeFloatExpected: -2,
    floatStringInput: '4.9',
    floatStringExpected: 4,
    invalidStringInput: 'abc',
  },
  toSafeBooleanOrNull: {
    nullInput: null,
    undefinedInput: undefined,
    trueInput: true,
    falseInput: false,
    zeroInput: 0,
    zeroExpected: false,
    oneInput: 1,
    oneExpected: true,
    negativeInput: -1,
    negativeExpected: true,
    trueStringInput: 'true',
    trueStringExpected: true,
    falseStringInput: 'false',
    falseStringExpected: false,
    oneStringInput: '1',
    oneStringExpected: true,
    zeroStringInput: '0',
    zeroStringExpected: false,
    invalidStringInput: 'yes',
  },
};
