import {DisplayObject} from "pixi.js";
import {ITrackEntry} from "pixi-spine";

/**
 * @interface Entity
 * @description Represents an entity.
 */
export interface Entity extends DisplayObject{
  key: string
  reset(): void;
}

/**
 * @interface Entity
 * @description Represents an entity than can be updated.
 */
export interface Updatable {
  update(dt: number): void;
}

/**
 * @interface CanBeBlocked
 * @description Represents an entity than can be marked as blocked.
 */
export interface CanBeBlocked {
  isBlocked: boolean;
}

export interface CanBeLanded {
  isLanded: boolean;
}

/**
 * @interface CanBeMasked
 * @description Represents an entity that supports enabling and disabling masking.
 */
export interface CanBeMasked {
  isMasked: boolean;
}

export interface CanBeHighlighted {
  isHighlighted: boolean;
  highlight: () => ITrackEntry;
}

/**
 * @interface CanPlayFalling
 * @description Represents an entity than can play falling animation.
 */
export interface CanPlayFalling {
  falling: () => ITrackEntry;
}

/**
 * @interface CanPlayIdle
 * @description Represents an entity than can play idle animation.
 */
export interface CanPlayIdle {
  idle: () => ITrackEntry;
}

/**
 * @interface CanPlayBouncing
 * @description Represents an entity than can play bounce animation.
 */
export interface CanPlayBouncing {
  bounce: () => ITrackEntry;
}

/**
 * @interface CanPlayWin
 * @description Represents an entity than can play win animation.
 */
export interface CanPlayWin {
  win: () => ITrackEntry;
}

/**
 * @interface CanPlayIn
 * @description Represents an entity than can play in animation.
 */
export interface CanPlayIn {
  in: () => ITrackEntry;
}

/**
 * @interface CanPlayOut
 * @description Represents an entity than can play out animation.
 */
export interface CanPlayOut {
  out: () => ITrackEntry;
}

/**
 * @interface CanPlaySticky
 * @description Represents an entity than can play sticky animation.
 */
export interface CanPlaySticky {
  sticky: () => ITrackEntry;
}


/**
 * @interface CanBeBlurred
 * @description Represents an entity compatible with system-driven blur toggling.
 */
export interface CanBeBlurred extends DisplayObject {
  /** Indicates whether the blur effect should be active. */
  isBlurred: boolean;
  /** Reflects whether the blur filter is currently applied. */
  blurEnabled: boolean;
}

/**
 * @interface ValueAssignable
 * @description Represents an entity with an assignable numeric value.
 */
export interface ValueAssignable  {
  value: number
}

/**
 * @interface CanPlaySpin
 * @description Interface representing an entity capable of performing a spin action.
 */
export interface CanPlaySpin {
  spin: () => ITrackEntry;
}

/**
 * @interface CanBeTinted
 * @description Represents an entity that can be tinted with a specified color.
 */
export interface CanBeTinted {
  tint(hexColor: number): void
  preventTint: boolean
}

export interface CanPlayAnticipation {
  anticipate(): ITrackEntry;
}
