import { ReactNode } from 'react'; import { Mod } from '../../../mod/poe'; import { RollableValue, MinMaxValue, AugmentableValue } from '../../../util/value'; import { ExclusifyUnion } from '../../../util/types'; export declare type Item = AbstractItem & ItemProperties; /** * if base.id is provided the component tries to translate * the basename according to the provided messages * for magic items this means that you have to set `prefix` and `suffix` * to the respective mod id to provide full i18n support */ export interface AbstractItem { base: { id?: string; name?: string; }; name?: string; rarity: Rarity; requirements?: { [key: string]: AugmentableValue | undefined; level?: AugmentableValue; dexterity?: AugmentableValue; intelligence?: AugmentableValue; strength?: AugmentableValue; }; craftedStats?: ReactNode[]; enchantStats?: ReactNode[]; explicitStats?: ReactNode[]; implicitStats?: ReactNode[]; utilityStats?: ReactNode[]; prefix?: string; suffix?: string; elder?: boolean; shaper?: boolean; corrupted?: boolean; } export declare type Rarity = 'normal' | 'magic' | 'rare' | 'unique'; export declare type ItemProperties = ExclusifyUnion; export interface AbstractProperties { quality?: number; } export interface ArmourProperties extends AbstractProperties { armour?: AugmentableValue; energy_shield?: AugmentableValue; evasion?: AugmentableValue; } export declare function isArmourProperties(props: ItemProperties): props is ArmourProperties; export interface ShieldProperties extends ArmourProperties { block: AugmentableValue; } export declare function isShieldProperties(props: ItemProperties): props is ShieldProperties; export interface WeaponProperties extends AbstractProperties { physical_damage?: AugmentableValue; cold_damage?: MinMaxValue; fire_damage?: MinMaxValue; lightning_damage?: MinMaxValue; chaos_damage?: MinMaxValue; aps?: AugmentableValue; /** * value: 0-10000 * 10000 => 100% * 1000 => 10% * 100 => 1% * 10 => 0.1% * 1 => 1% */ crit?: AugmentableValue; range?: AugmentableValue; } export declare function isWeaponProperties(props: ItemProperties): props is WeaponProperties; export declare type NoProperties = AbstractProperties; export declare type Affix = ReactNode | Mod; export declare type Affixes = Affix[];