import { Interpolation, Theme } from '@emotion/react'; import { MaterialItem } from '@gamepark/rules-api'; import { ItemContext, MaterialContext } from '../../../locators'; import { MaterialContentProps } from '../MaterialDescription'; import { MobileMaterialDescription } from '../MobileMaterialDescription'; export declare abstract class FlatMaterialDescription

extends MobileMaterialDescription { /** * Front image(s) to display. Accepts a single image or an array of alternatives * from which one is randomly picked per displayed instance (see {@link getImage}). */ image?: string | string[]; /** * Front images indexed by item id. Each entry accepts a single image or an array * of alternatives from which one is randomly picked per displayed instance. */ images?: Record; /** * Returns the front image to display for a given item. * When several alternatives are configured (array of strings), a random one is * picked for each visual instance and memorized, so subsequent renders of the * same instance keep showing the same image. * * @param itemId Id of the item * @param itemIndex Index of the item in the game state (undefined for components rendered outside of the game table) * @param displayIndex Index of the visual copy when an item has `quantity > 1` (undefined when not applicable) */ getImage(itemId: ItemId, itemIndex?: number, displayIndex?: number): string | undefined; backImage?: string | string[]; backImages?: Record; getBackImage(itemId: ItemId, itemIndex?: number, displayIndex?: number): string | undefined; private pickedImages; private pickImage; getImages(): string[]; protected getFrontId(itemId: ItemId): any; protected getBackId(itemId: ItemId): any; protected hasBackFace(): boolean; /** * If the items image has transparency (shadows must be handled inside the image if there is transparency) */ transparency: boolean; /** * Whether a specific item has transparency. Default to {@link transparency} * @param _itemId the item id */ hasTransparency(_itemId: ItemId): boolean; isFlipped(item: Partial>, _context: MaterialContext): boolean; isFlippedOnTable(item: Partial>, context: MaterialContext): boolean; isFlippedInDialog(item: Partial>, context: MaterialContext): boolean; getItemTransform(item: MaterialItem, context: ItemContext): string[]; content: (props: MaterialContentProps) => import("@emotion/react/jsx-runtime").JSX.Element; /** * Each face carries its own children: whoever renders the item decides which face a location belongs to, and * gives it as children or as backChildren (see {@link Locator.getParentFace}). A face turned away from the * player is hidden by its backface-visibility, which takes it and its children out of the page altogether, * pointer events included, which is exactly what a location printed on the other face has to be. */ contentWithBackChildren: ({ itemId, itemIndex, displayIndex, highlight, playDown, preview, children, backChildren }: MaterialContentProps) => import("@emotion/react/jsx-runtime").JSX.Element; getFrontExtraCss(_itemId: ItemId): Interpolation; getBackExtraCss(_itemId: ItemId): Interpolation; /** * An item turned onto a back that all items of its type share is not hovered: every one of them looks the same, * so there is nothing to look closer at. * {@link backImage} on purpose here rather than {@link hasBackFace}: when the backs differ from one item to the * next ({@link backImages}), the back carries something of its own and hovering it is legitimate. * * An item that is hovered while turned onto its back has what the locator asks for mirrored. * {@link getItemTransform} ends with the rotateY(180deg) that shows the back, so everything the locator returns * would otherwise be read in a frame that has been turned over: a translateZ would push the item away from the * player instead of lifting it towards them, and a rotateZ would tilt it the wrong way round, doubling the angle * of a hand instead of straightening it. Mirroring leaves the locator to describe what it means, in the frame it * means it in, whichever face the item shows. * Wrapping the list in the 2 rotations computes the same thing, and is what a list that cannot be mirrored falls * back on, at the price of a transition that swings the item sideways on its way (see {@link mirrorTransforms}). */ getHoverTransform(item: MaterialItem, context: ItemContext): string[]; getHelpDisplayExtraCss(item: Partial>, context: ItemContext): Interpolation; }