export function validateColumnNames(record: object) {
  // Get the keys of the first record. Treat it as the column names. Trim the keys to remove any leading or trailing spaces.
  const keys = Object.keys(record).map((key) => key.trim());
  const dtoKeys = [
    'Account ID',
    'Subsidiary Name',
    'Parent Company ID',
    'Parent Company Name',
    'Brands',
    'Email',
  ];
  //   Find the missing columns
  const missingColumns = dtoKeys.filter((key) => !keys.includes(key));
  if (missingColumns.length > 0) {
    throw new Error(
      `Missing column(s) in CSV file: ${missingColumns.join(', ')}`,
    );
  }
}
