import { createRandomId } from '../util';
import { RemissionProduct } from '../../models/remission-product';

export const remissionProducts: RemissionProduct[] = [
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Max Mustermann',
    name: 'Remission für Dummies',
    format: 'HC',
    formatDetail: 'Buch (Gebunden)',
    ean: '6294261363805',
    price: 38.9,
    currency: 'EUR',
    productGroup: '121',
    productGroupName: 'Krimi/Spannung',
    inStock: 40,
    remissionQuantity: 25,
    remainingQuantity: 15,
    placementType: 'Stapel',
    remissionReason: 'Kulanz',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Sascha Kersken',
    name: 'Remission für Fortgeschrittene',
    format: 'HC',
    formatDetail: 'Buch (Kartoniert, Paperback)',
    ean: '2638489561882',
    price: 10,
    currency: 'EUR',
    productGroup: '111',
    productGroupName: 'Krimi/Spannung',
    inStock: 10,
    remissionQuantity: 9,
    remainingQuantity: 1,
    placementType: 'Leistung',
    remissionReason: 'Falschlieferung',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOE',
        name: 'Extrasortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Hugen Dubel',
    name: 'So werden Sie zum Remissions-Experten',
    format: 'TB',
    formatDetail: 'Taschenbuch',
    ean: '4638419565833',
    price: 15.29,
    currency: 'EUR',
    productGroup: '133',
    productGroupName: 'Esoterik',
    inStock: 100,
    remissionQuantity: 1,
    remainingQuantity: 99,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '3.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOZ',
        name: 'Zentralsortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Pötzsch, Oliver',
    name: 'Der Spielmann',
    format: 'TB',
    formatDetail: 'Taschenbuch',
    ean: '4169898411136',
    price: 5.99,
    currency: 'EUR',
    productGroup: '935',
    productGroupName: 'Fantasie',
    inStock: 2,
    remissionQuantity: 1,
    remainingQuantity: 1,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Homann, Eberhard, Homann, Klaudia',
    name: 'Individualreiseführer mit Extra-Reisekarte und Karten-Download',
    format: 'HC',
    formatDetail: 'Buch (Kartoniert, Paperback)',
    ean: '9723831038123',
    price: 19.95,
    currency: 'EUR',
    productGroup: '112',
    productGroupName: 'Krimi',
    inStock: 5,
    remissionQuantity: 5,
    remainingQuantity: 0,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOE',
        name: 'Extrasortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Blümm, Florian',
    name: 'Mit wenig Geld um die Welt',
    format: 'TB',
    formatDetail: 'Taschenbuch',
    ean: '6169892433336',
    price: 7,
    currency: 'EUR',
    productGroup: '312',
    productGroupName: 'Abenteuer/Reise',
    inStock: 45,
    remissionQuantity: 3,
    remainingQuantity: 42,
    placementType: 'Leistung',
    remissionReason: 'Kulanz',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Murakami, Haruki, Gräfe, Ursula',
    name: 'Wovon ich rede, wenn ich vom Laufen rede',
    format: 'TB',
    formatDetail: 'Taschenbuch (Kartoniert, Paperback)',
    ean: '4642419565833',
    price: 11.49,
    currency: 'EUR',
    productGroup: '112',
    productGroupName: 'Krimi',
    inStock: 250,
    remissionQuantity: 10,
    remainingQuantity: 240,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '2.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOZ',
        name: 'Zentralsortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'McKeown, Patrick',
    name: 'Erfolgsfaktor Sauerstoff',
    format: 'EB',
    formatDetail: 'E-Book (E-Book)',
    ean: '4638419765833',
    price: 15.99,
    currency: 'EUR',
    productGroup: '973',
    productGroupName: 'Wissenschaft',
    inStock: 12,
    remissionQuantity: 8,
    remainingQuantity: 4,
    placementType: 'Stapel',
    remissionReason: 'Kulanz',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOZ',
        name: 'Zentralsortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Lobrecht, Felix',
    name: 'Sonne und Beton',
    format: 'HC',
    formatDetail: 'Buch (Gebunden)',
    ean: '6294261363805',
    price: 3.9,
    currency: 'EUR',
    productGroup: '112',
    productGroupName: 'Krimi/Spannung',
    inStock: 33,
    remissionQuantity: 11,
    remainingQuantity: 22,
    placementType: 'Stapel',
    remissionReason: 'Kulanz',
    edition: '4.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Dorléans, Marie',
    name: 'Auf leisen Sohlen durch die Nacht',
    format: 'TB',
    formatDetail: 'Taschenbuch',
    ean: '4638529565833',
    price: 15.29,
    currency: 'EUR',
    productGroup: '133',
    productGroupName: 'Esoterik',
    inStock: 100,
    remissionQuantity: 1,
    remainingQuantity: 99,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '6.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOZ',
        name: 'Zentralsortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'May, Sabine',
    name: 'ADAC Reiseführer Algarve',
    format: 'HC',
    formatDetail: 'Buch (Gebunden)',
    ean: '6294261363305',
    price: 6.95,
    currency: 'EUR',
    productGroup: '312',
    productGroupName: 'Abenteuer/Reise',
    inStock: 30,
    remissionQuantity: 10,
    remainingQuantity: 20,
    placementType: 'Stapel',
    remissionReason: 'Kulanz',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Schützsack, Lara',
    name: 'Sonne, Moon und Sterne',
    format: 'HC',
    formatDetail: 'Buch (Gebunden)',
    ean: '6374261363305',
    price: 6.95,
    currency: 'EUR',
    productGroup: '312',
    productGroupName: 'Abenteuer/Reise',
    inStock: 30,
    remissionQuantity: 10,
    remainingQuantity: 20,
    placementType: 'Stapel',
    remissionReason: 'Kulanz',
    edition: '2.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Taleb, Nassim Nicholas',
    name: 'Skin in the Game',
    format: 'HC',
    formatDetail: 'Buch (Kartoniert, Paperback)',
    ean: '6294266323805',
    price: 14.49,
    currency: 'EUR',
    productGroup: '112',
    productGroupName: 'Krimi/Spannung',
    inStock: 10,
    remissionQuantity: 3,
    remainingQuantity: 7,
    placementType: 'Stapel',
    remissionReason: 'Herstellerfehler',
    edition: '4.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Gehrmann, Markus Don Alfred',
    name: 'Fraktale',
    format: 'HC',
    formatDetail: 'Buch (Kartoniert, Paperback)',
    ean: '6294261363805',
    price: 208.99,
    currency: 'EUR',
    productGroup: '111',
    productGroupName: 'Krimi/Spannung',
    inStock: 2,
    remissionQuantity: 2,
    remainingQuantity: 0,
    placementType: 'Stapel',
    remissionReason: 'Herstellerfehler',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Fowler, Martin',
    name: 'Refactoring',
    format: 'EB',
    formatDetail: 'E-Book (E-Book)',
    ean: '3214231363805',
    price: 42,
    currency: 'EUR',
    productGroup: '113',
    productGroupName: 'Krimi/Spannung',
    inStock: 3,
    remissionQuantity: 2,
    remainingQuantity: 1,
    placementType: 'Stapel',
    remissionReason: 'Herstellerfehler',
    edition: '10.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783836270236',
    contributors: 'Frankl, Viktor E.',
    name: "Man's Search for Meaning",
    format: 'TB',
    formatDetail: 'Taschenbuch (Kartoniert, Paperback)',
    ean: '7638229565833',
    price: 12.9,
    currency: 'EUR',
    productGroup: '133',
    productGroupName: 'Esoterik',
    inStock: 5,
    remissionQuantity: 1,
    remainingQuantity: 4,
    placementType: 'Leistung',
    remissionReason: 'Herstellerfehler',
    edition: '6.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
      {
        key: 'SOZ',
        name: 'Zentralsortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Heinemeyer, Christoph',
    name: 'Brandsicherheit durch Konstruktion und Stahlsortenwahl',
    format: 'EB',
    formatDetail: 'E-Book (E-Book)',
    ean: '4212431233805',
    price: 16.99,
    currency: 'EUR',
    productGroup: '113',
    productGroupName: 'Krimi/Spannung',
    inStock: 49,
    remissionQuantity: 4,
    remainingQuantity: 45,
    placementType: 'Stapel',
    remissionReason: 'Herstellerfehler',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
  {
    id: createRandomId(),
    imageId: '9783864906466',
    contributors: 'Heinemeyer, Elfriede; Ottenjann, Helmut',
    name: 'Alte Bauernmöbel aus dem nordwestlichen Niedersachsen',
    format: 'EB',
    formatDetail: 'E-Book (E-Book)',
    ean: '4212477733805',
    price: 16.99,
    currency: 'EUR',
    productGroup: '113',
    productGroupName: 'Krimi/Spannung',
    inStock: 28,
    remissionQuantity: 14,
    remainingQuantity: 14,
    placementType: 'Stapel',
    remissionReason: 'Herstellerfehler',
    edition: '1.',
    features: [
      {
        key: 'SOB',
        name: 'Basissortiment',
      },
    ],
  },
];

export function createRemissionProduct(product: Partial<RemissionProduct>): RemissionProduct {
  const baseProduct = remissionProducts[0];
  const newProduct = { ...baseProduct, ...product };

  return newProduct;
}
