/* eslint-disable @typescript-eslint/consistent-type-assertions */
/* eslint-disable-camelcase */
/* eslint-disable @typescript-eslint/camelcase */
/* eslint-disable @typescript-eslint/no-explicit-any */

import { UserProfile, Product, Order } from '../../src/types';

// #region Product

export const intoOrderSubmited = (cart: any, order: any): Order => {
  const items: Product[] = [];

  const orderSubmited: Order = {
    cart_id: cart.hash,
    order_id: order.id,
    Items: items,
    channel: 'Mobile'
  };

  return orderSubmited;
};

export const immutableCustomerIntoUserProfile = (costumer: any): UserProfile => {
  const userProfile: UserProfile = {
    Identity: costumer.uid,
    Name: costumer.displayName,
    Email: costumer.email,
    Phone: costumer.phoneNumber,
    Photo: costumer.photoURL
  };

  return userProfile;
};
