import { Interpolation, Theme } from '@emotion/react'; import { Animation, Animations } from '@gamepark/react-client'; import { GridBoundaries, ItemMove, ItemMoveType, MaterialGame, MaterialMove, MaterialRules } from '@gamepark/rules-api'; import { ItemContext, Locator } from '../../../locators'; import { MaterialDescription } from '../MaterialDescription'; import { ItemAnimations } from './ItemAnimations'; import { MaterialGameAnimationContext } from './MaterialGameAnimations'; import { Trajectory } from './Trajectory'; export declare class MaterialAnimations

extends Animations, MaterialMove, P> { protected readonly animations: Partial>>; constructor({ duration, droppedItemDuration, trajectory, shuffleDuration, createAtOnceDuration }?: MaterialAnimationsConfig); getDuration(move: ItemMove, context: MaterialGameAnimationContext): number; getItemAnimation(context: ItemContext, animation: Animation>, boundaries: GridBoundaries): Interpolation; } /** * What a {@link MaterialAnimations} is made of: four durations, all in seconds, and the trajectory * the items follow. Named rather than passed in a row, because a list of durations is a list in which only * the order tells a shuffle from a drop — and because every new one added would have to be threaded through * the call sites that do not care about it. */ export type MaterialAnimationsConfig

= { /** How long an item takes to reach the place a move sends it to. Defaults to a second. */ duration?: number; /** * How long an item the player has dropped themselves takes to settle. Much shorter than the rest: the item * is already where the hand left it, and all that is left to animate is the snap onto its place. */ droppedItemDuration?: number; /** The path items follow rather than the straight line: its arc, its waypoints, its easing. */ trajectory?: Trajectory; /** * How long a shuffle lasts. Not a displacement from A to B: it needs to last long enough for the random * movement to read as "the items were mixed up", hence a default of its own rather than {@link duration}. */ shuffleDuration?: number; /** * How long items created together fly for. Creating items at once is what a game does to lay out a whole * setup in one small payload, so it animates nothing by default (see {@link defaultCreateAtOnceDuration}): * a game that wants those creations seen asks for it, on the moves it wants it on. */ createAtOnceDuration?: number; }; export type ItemAnimationContext

= { material: Record>; locators: Record>; rules: MaterialRules; player?: P; };