import { EventEmitter, math } from '@galacean/effects'; import type { Box2 } from '../math'; export type LoadingItemOptions = { text?: string; /** 相对目标元素实时包围盒左上角的视图像素偏移;未设置时文案在 loading 区域内居中。 */ position?: math.Vector2; /** 打开 loading 时是否移除目标元素的选中状态。 */ clearSelected?: boolean; loadingBox?: Box2; }; export interface LoadingItemState { tip: LoadingItemOptions; loadingBox?: Box2; } export type LoadingManagerChange = { ids: string[]; addedIds: string[]; removedIds: string[]; updatedIds: string[]; }; type LoadingManagerEvents = { change: [LoadingManagerChange]; removeselecteditems: [string[]]; }; /** Stable loading state shared by disposable LoadingGizmo projections. */ export declare class LoadingManager extends EventEmitter { private readonly _items; get ids(): string[]; get(id: string): LoadingItemState | undefined; add(id: string, options?: LoadingItemOptions): void; delete(id: string): void; update(id: string, options: LoadingItemOptions): void; private _emitChange; } export {};