import { CharacterClass, ICharacterPartyShared } from '@rpg-engine/shared';
import { v4 as uuidv4 } from 'uuid';
import { IPartyRowProps } from '../PartyDashboard/PartyRows';
import { IPlayersRowProps } from '../PartyInvite';

export const mockedPartyRows: IPartyRowProps[] = [
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    playerQty: 3,
    isInvited: true,
    partyName: 'Party',
  },
];

export const mockedPlayersRows2: ICharacterPartyShared = {
  id: uuidv4(),
  leader: {
    _id: uuidv4(),
    class: CharacterClass.Druid,
    name: 'leader',
  },
  members: [
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },
  ],
  maxSize: 5,
  size: 4,
};

export const mockedPlayersRows: IPlayersRowProps[] = [
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    isNotInvited: true,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    isNotInvited: true,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    isNotInvited: true,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    isNotInvited: true,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    charLevel: 1,
    isNotInvited: true,
  },
];

export const mockedPartyManager: any[] = [
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    isLeader: false,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    isLeader: false,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    isLeader: false,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    isLeader: false,
  },
  {
    id: uuidv4(),
    charName: 'CharNome',
    charClass: 'CharClass',
    isLeader: false,
  },
];

// Function to generate mock data for when you are the leader
export const getMockedPlayersRowsLeader = (
  userId: string
): ICharacterPartyShared => ({
  id: uuidv4(),
  leader: {
    _id: userId, // You are the leader
    class: CharacterClass.Warrior,
    name: 'YourName',
  },
  members: [
    { _id: uuidv4(), class: CharacterClass.Druid, name: 'Member1' },
    { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },
    { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },
  ],
  maxSize: 5,
  size: 4,
});

// Function to generate mock data for when you are not the leader
export const getMockedPlayersRowsNotLeader = (
  userId: string
): ICharacterPartyShared => ({
  id: uuidv4(),
  leader: {
    _id: uuidv4(), // Someone else is the leader
    class: CharacterClass.Druid,
    name: 'LeaderName',
  },
  members: [
    { _id: userId, class: CharacterClass.Warrior, name: 'YourName' }, // You are a member
    { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },
    { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },
  ],
  maxSize: 5,
  size: 4,
});
