import type { TStoreNumber } from "../../autofill";
import { randInt } from "../../util";
import { TBeautyStorePreset } from "./util/types";

const EXPRESS_STORE_PRESET_3: TBeautyStorePreset = {
  contact_name: "",
  skincare: {
    thayers_oos_before: () => 3,
    thayers_stocked: () => randInt(5, 6),
    garnier_oos_before: () => randInt(3, 4),
    garnier_stocked: () => 5,
    loreal_oos_before: () => randInt(3, 4),
    loreal_stocked: () => 5,
  },
  haircare: {
    elvive_oos_before: () => 10,
    elvive_stocked: () => randInt(7, 10),
    ever_oos_before: () => randInt(4, 6),
    ever_stocked: () => randInt(7, 10),
    fructis_oos_before: () => randInt(4, 6),
    fructis_stocked: () => randInt(7, 10),
    whole_blends_oos_before: () => randInt(2, 4),
    whole_blends_stocked: () => randInt(3, 6),
    carols_daughter_oos_before: () => randInt(2, 4),
    carols_daughter_stocked: () => randInt(3, 6),
  },
  haircolor: {
    loreal_oos_before: () => randInt(7, 10),
    loreal_stocked: () => randInt(9, 10),
    garnier_oos_before: () => randInt(7, 10),
    garnier_stocked: () => randInt(9, 10),
    darknlovely_oos_before: () => randInt(2, 4),
    darknlovely_stocked: () => randInt(4, 5),
  },
  colorsonic: {
    before: () => 3,
    total_stocked: () => 10,
  },
  maybelline: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(14, 20),
    total_stocked: () => 40,
  },
  essie: {
    oos_before: () => randInt(11, 16),
    total_stocked: () => 15,
  },
  loreal: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(13, 19),
    total_stocked: () => 30,
  },
  nyx: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(14, 20),
    total_stocked: () => 30,
  },
};

const EXPRESS_STORE_PRESET_5: TBeautyStorePreset = {
  contact_name: "",
  skincare: {
    thayers_oos_before: () => 3,
    thayers_stocked: () => randInt(5, 6),
    garnier_oos_before: () => randInt(3, 4),
    garnier_stocked: () => 5,
    loreal_oos_before: () => randInt(3, 4),
    loreal_stocked: () => 5,
  },
  haircare: {
    elvive_oos_before: () => 10,
    elvive_stocked: () => randInt(7, 10),
    ever_oos_before: () => randInt(4, 6),
    ever_stocked: () => randInt(7, 10),
    fructis_oos_before: () => randInt(4, 6),
    fructis_stocked: () => randInt(7, 10),
    whole_blends_oos_before: () => randInt(2, 4),
    whole_blends_stocked: () => randInt(3, 6),
    carols_daughter_oos_before: () => randInt(2, 4),
    carols_daughter_stocked: () => randInt(3, 6),
  },
  haircolor: {
    loreal_oos_before: () => randInt(7, 10),
    loreal_stocked: () => randInt(9, 10),
    garnier_oos_before: () => randInt(7, 10),
    garnier_stocked: () => randInt(9, 10),
    darknlovely_oos_before: () => randInt(2, 4),
    darknlovely_stocked: () => randInt(4, 5),
  },
  colorsonic: {
    before: () => 3,
    total_stocked: () => 10,
  },
  maybelline: {
    total_stocked: () => 40,
    face_oos_before: () => randInt(8, 12),
    eye_oos_before: () => randInt(8, 13),
    lip_oos_before: () => randInt(9, 14),
  },
  essie: {
    oos_before: () => randInt(8, 11),
    total_stocked: () => 15,
  },
  loreal: {
    face_oos_before: () => randInt(9, 14),
    eye_oos_before: () => randInt(12, 15),
    lip_oos_before: () => randInt(5, 9),
    total_stocked: () => 30,
  },
  nyx: {
    face_oos_before: () => randInt(8, 13),
    eye_oos_before: () => randInt(10, 15),
    lip_oos_before: () => randInt(14, 19),
    total_stocked: () => 30,
  },
};

const LARGE_STORE_PRESET_5: TBeautyStorePreset = {
  contact_name: "",
  skincare: {
    thayers_oos_before: () => randInt(2, 3),
    thayers_stocked: () => randInt(5, 6),
    garnier_oos_before: () => randInt(3, 4),
    garnier_stocked: () => 5,
    loreal_oos_before: () => randInt(3, 4),
    loreal_stocked: () => 5,
  },
  haircare: {
    elvive_oos_before: () => 10,
    elvive_stocked: () => randInt(7, 10),
    ever_oos_before: () => randInt(4, 6),
    ever_stocked: () => randInt(7, 10),
    fructis_oos_before: () => randInt(4, 6),
    fructis_stocked: () => randInt(7, 10),
    whole_blends_oos_before: () => randInt(2, 4),
    whole_blends_stocked: () => randInt(3, 6),
    carols_daughter_oos_before: () => randInt(2, 4),
    carols_daughter_stocked: () => randInt(3, 6),
  },
  haircolor: {
    loreal_oos_before: () => randInt(7, 10),
    loreal_stocked: () => randInt(9, 10),
    garnier_oos_before: () => randInt(7, 10),
    garnier_stocked: () => randInt(9, 10),
    darknlovely_oos_before: () => randInt(2, 4),
    darknlovely_stocked: () => randInt(4, 5),
  },
  colorsonic: {
    before: () => 3,
    total_stocked: () => 10,
  },
  maybelline: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(14, 20),
    total_stocked: () => 40,
  },
  essie: {
    oos_before: () => randInt(11, 16),
    total_stocked: () => 15,
  },
  loreal: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(13, 19),
    total_stocked: () => 30,
  },
  nyx: {
    face_oos_before: () => randInt(13, 18),
    eye_oos_before: () => randInt(13, 18),
    lip_oos_before: () => randInt(14, 20),
    total_stocked: () => 30,
  },
};

const LARGE_STORE_PRESET_3: TBeautyStorePreset = {
  contact_name: "",
  skincare: {
    thayers_oos_before: () => randInt(2, 3),
    thayers_stocked: () => randInt(5, 6),
    garnier_oos_before: () => randInt(3, 4),
    garnier_stocked: () => 5,
    loreal_oos_before: () => randInt(3, 4),
    loreal_stocked: () => 5,
  },
  haircare: {
    elvive_oos_before: () => 10,
    elvive_stocked: () => randInt(7, 10),
    ever_oos_before: () => randInt(4, 6),
    ever_stocked: () => randInt(7, 10),
    fructis_oos_before: () => randInt(4, 6),
    fructis_stocked: () => randInt(7, 10),
    whole_blends_oos_before: () => randInt(2, 4),
    whole_blends_stocked: () => randInt(3, 6),
    carols_daughter_oos_before: () => randInt(2, 4),
    carols_daughter_stocked: () => randInt(3, 6),
  },
  haircolor: {
    loreal_oos_before: () => randInt(7, 10),
    loreal_stocked: () => randInt(9, 10),
    garnier_oos_before: () => randInt(7, 10),
    garnier_stocked: () => randInt(9, 10),
    darknlovely_oos_before: () => randInt(2, 4),
    darknlovely_stocked: () => randInt(4, 5),
  },
  colorsonic: {
    before: () => 3,
    total_stocked: () => 10,
  },
  maybelline: {
    face_oos_before: () => randInt(10, 15),
    eye_oos_before: () => randInt(10, 15),
    lip_oos_before: () => randInt(11, 17),
    total_stocked: () => 40,
  },
  essie: {
    oos_before: () => randInt(9, 13),
    total_stocked: () => 15,
  },
  loreal: {
    face_oos_before: () => randInt(10, 15),
    eye_oos_before: () => randInt(10, 15),
    lip_oos_before: () => randInt(10, 16),
    total_stocked: () => 30,
  },
  nyx: {
    face_oos_before: () => randInt(10, 15),
    eye_oos_before: () => randInt(10, 15),
    lip_oos_before: () => randInt(11, 17),
    total_stocked: () => 30,
  },
};

// Keyed by Store Number (uppercase "T" plus four digits).
export const BEAUTY_STORE_PRESETS: Record<TStoreNumber, TBeautyStorePreset> = {
  T1150: {
    ...LARGE_STORE_PRESET_5,
    contact_name: "Natalia, LOD",
  },
  T1344: {
    ...LARGE_STORE_PRESET_5,
    contact_name: "Danica, LOD",
  },
  T2451: {
    ...LARGE_STORE_PRESET_3,
    contact_name: "Erica, LOD",
  },
  T3312: {
    ...EXPRESS_STORE_PRESET_5,
    contact_name: "Janet, LOD",
  },
  T3284: {
    ...EXPRESS_STORE_PRESET_3,
    contact_name: "Lynecia, LOD",
  },
};
