import { Platform } from 'react-native';

export const LINKING_ERROR =
  `The package 'myfatoorah-reactnative' doesn't seem to be linked. Make sure: \n\n` +
  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
  '- You rebuilt the app after installing the package\n' +
  '- You are not using Expo Go\n';

export const PLATFORM_ERROR = `ApplePay is not supported in this device`;

export const modelParser = <T,>(resultString: string): T => {
  return JSON.parse(resultString);
};
