import { Module, ModuleOptions, PisellCore } from '../../../types';
import { BaseModule } from '../../../modules/BaseModule';
import { type ResourceBooking, type ResourceData, type ResourceId, type QueryOptions } from './types';
/**
 * Resource 模块
 */
export declare class ResourceModule extends BaseModule implements Module {
    protected defaultName: string;
    protected defaultVersion: string;
    private store;
    private dbManager;
    private logger;
    private resourceDataSource;
    /** 倒排索引: resourceId -> ResourceBooking[] */
    private resourceIdIndex;
    /** 待处理的同步消息队列 */
    private pendingSyncMessages;
    private syncTimer?;
    constructor(name?: string, version?: string);
    initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
    private logInfo;
    private logError;
    preload(): Promise<void>;
    getRoutes(): never[];
    destroy(): void;
    /**
     * 获取所有资源（支持 includeBookings 附加预订信息）
     */
    getResources(queryOptions?: QueryOptions): ResourceData[];
    /**
     * 根据 ID 获取单个资源
     */
    getResourceById(id: ResourceId, queryOptions?: QueryOptions): ResourceData | undefined;
    /**
     * 创建资源
     */
    createResource(data: Partial<ResourceData>): ResourceData;
    /**
     * 更新资源
     */
    updateResource(id: ResourceId, data: Partial<ResourceData>): ResourceData | undefined;
    /**
     * 删除资源
     */
    deleteResource(id: ResourceId): boolean;
    /**
     * 根据资源 ID 获取预订列表
     */
    getBookingsByResourceId(resourceId: ResourceId): ResourceBooking[];
    /**
     * 创建预订
     */
    /**
     * 更新预订
     */
    /**
     * 删除预订
     */
    /**
     * 清空缓存
     */
    clear(): Promise<void>;
    private attachBookingsToResource;
    private normalizeResource;
    private safeEmit;
    private syncResourcesMap;
    private syncBookingsIndex;
    private rebuildBookingsIndex;
    private getIdKey;
    private loadResourcesByServer;
    private loadResourcesFromSQLite;
    private saveResourcesToSQLite;
    private initResourceDataSource;
    private setupResourceSync;
    private processSyncMessages;
    private fetchResourcesBySSE;
    private removeResourcesByIds;
    private mergeResourcesToStore;
    private uniqueResourceIds;
}
export declare const resourceModule: ResourceModule;
export type { ResourceData, ResourceBooking, ResourceState, ResourceId, ResourcePageQuery, ResourcePageResult, QueryOptions, ScheduleEventResource, } from './types';
export { ResourceHooks } from './types';
