export const CONST_KEYS = {
  minRegularOrderValue: 'minRegularOrderValue',
  freeDeliveryThreshold: 'freeDeliveryThreshold',
  deliveryCharge: 'deliveryCharge',
  flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',
  flashDeliveryCharge: 'flashDeliveryCharge',
  platformFeePercent: 'platformFeePercent',
  taxRate: 'taxRate',
  tester: 'tester',
  minOrderAmountForCoupon: 'minOrderAmountForCoupon',
  maxCouponDiscount: 'maxCouponDiscount',
  flashDeliverySlotId: 'flashDeliverySlotId',
  readableOrderId: 'readableOrderId',
  versionNum: 'versionNum',
  cacheVersion: 'cache_version',
  playStoreUrl: 'playStoreUrl',
  appStoreUrl: 'appStoreUrl',
  popularItems: 'popularItems',
  allItemsOrder: 'allItemsOrder',
  isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',
  supportMobile: 'supportMobile',
  supportEmail: 'supportEmail',
} as const;

export const CONST_LABELS: Record<ConstKey, string> = {
  minRegularOrderValue: 'Minimum Regular Order Value',
  freeDeliveryThreshold: 'Free Delivery Threshold',
  deliveryCharge: 'Delivery Charge',
  flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',
  flashDeliveryCharge: 'Flash Delivery Charge',
  platformFeePercent: 'Platform Fee Percent',
  taxRate: 'Tax Rate',
  tester: 'Tester',
  minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',
  maxCouponDiscount: 'Maximum Coupon Discount',
  flashDeliverySlotId: 'Flash Delivery Slot ID',
  readableOrderId: 'Readable Order ID',
  versionNum: 'Version Number',
  'cache_version': 'Cache Version',
  playStoreUrl: 'Play Store URL',
  appStoreUrl: 'App Store URL',
  popularItems: 'Popular Items',
  allItemsOrder: 'All Items Order',
  isFlashDeliveryEnabled: 'Enable Flash Delivery',
  supportMobile: 'Support Mobile',
  supportEmail: 'Support Email',
};

export type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];

export const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];

export type ConstValueType = 'string' | 'boolean' | 'number'

export const CONST_TYPES: Record<ConstKey, ConstValueType> = {
  minRegularOrderValue: 'number',
  freeDeliveryThreshold: 'number',
  deliveryCharge: 'number',
  flashFreeDeliveryThreshold: 'number',
  flashDeliveryCharge: 'number',
  platformFeePercent: 'number',
  taxRate: 'number',
  tester: 'string',
  minOrderAmountForCoupon: 'number',
  maxCouponDiscount: 'number',
  flashDeliverySlotId: 'number',
  readableOrderId: 'number',
  versionNum: 'string',
  'cache_version': 'number',
  playStoreUrl: 'string',
  appStoreUrl: 'string',
  popularItems: 'string',
  allItemsOrder: 'string',
  isFlashDeliveryEnabled: 'boolean',
  supportMobile: 'string',
  supportEmail: 'string',
};

export const CONST_VISIBILITY: Record<ConstKey, boolean> = {
  minRegularOrderValue: true,
  freeDeliveryThreshold: true,
  deliveryCharge: true,
  flashFreeDeliveryThreshold: true,
  flashDeliveryCharge: true,
  platformFeePercent: true,
  taxRate: false,
  tester: false,
  minOrderAmountForCoupon: true,
  maxCouponDiscount: false,
  flashDeliverySlotId: true,
  readableOrderId: false,
  versionNum: true,
  'cache_version': false,
  playStoreUrl: true,
  appStoreUrl: true,
  popularItems: true,
  allItemsOrder: true,
  isFlashDeliveryEnabled: true,
  supportMobile: true,
  supportEmail: true,
};
