declare module "*.css";

declare module "*.yml" {
  const data: unknown;
  export default data;
}

interface WeaponTemplate {
  name: string;
  cost: number;
  accuracy: string;
  damage: string;
  category: string;
  description?: string;
}

interface WeaponsFile {
  weapons: WeaponTemplate[];
}

interface ArmorShieldTemplate {
  name: string;
  cost: number;
  defense: string;
  magic_defense: string;
  initiative?: number;
  initative?: number; // typo present in source YAML
  category: string;
  description?: string;
}

interface ArmorShieldsFile {
  armor_shields: ArmorShieldTemplate[];
}

interface SpellTemplate {
  name: string;
  cost: string;
  targets: string;
  duration: string;
  description: string;
  class: string;
  offensive?: boolean;
}

interface SpellsFile {
  spells: SpellTemplate[];
}

interface BookPage {
  n: number;
  content: string;
}

interface BookData {
  title: string;
  logoText: string;
  pages: BookPage[];
}

interface Window {
  __BOOK_DATA__: BookData;
}
