export { M as MmdPlaylist, f as MmdPlaylistNode, j as MmdPresetItem, h as MmdResourceOption, N as NewMmdPlaylist, g as NewMmdPlaylistNode, k as NewMmdPresetItem, i as NewMmdResourceOption, a as mmdPlaylistNodes, e as mmdPlaylistNodesRelations, m as mmdPlaylists, d as mmdPlaylistsRelations, c as mmdPresetItems, b as mmdResourceOptions } from '../../drizzle-schema-BNhqj2AZ.js';
import { M as MMDPlaylistConfig } from '../../types-HorDyIRv.js';
import { U as UniversalFileService } from '../../UniversalFileService-Ct4baUMz.js';
import { F as FileMetadata } from '../../types-CK4We_aI.js';
import 'drizzle-orm';
import 'drizzle-orm/pg-core';
import 'three';
import 'events';

type SupportedModelFormat = 'pmx' | 'pmd';
interface ProcessMmdModelArchiveOptions {
    /**
     * 绝对路径，指向模型解压根目录，例如 /app/uploads/mmd/models
     */
    storageRoot: string;
    /**
     * 对外暴露的公共路径前缀，例如 /uploads/mmd/models
     * 默认与 storageRoot 中的叶子目录一致
     */
    publicRoot?: string;
    /**
     * 自定义文件夹名称，默认使用随机 UUID
     */
    folderName?: string;
}
interface ProcessMmdModelArchiveResult {
    /** 解压出来的目录（绝对路径） */
    directory: string;
    /** 与 storageRoot 相对的目录名 */
    relativeDirectory: string;
    /** 模型文件相对目录（包含子目录） */
    modelRelativePath: string;
    /** 可供前端使用的模型 URL */
    modelUrl: string;
    /** 模型格式 */
    format: SupportedModelFormat;
    /** 解压得到的文件数量 */
    filesExtracted: number;
}
declare const MMD_MODEL_ARCHIVE_MIME_TYPES: readonly ["application/zip", "application/x-zip-compressed", "multipart/x-zip"];
/**
 * 解析上传的 MMD 模型压缩包，保留目录结构并返回模型路径
 */
declare function processMmdModelArchive(buffer: Buffer, options: ProcessMmdModelArchiveOptions): Promise<ProcessMmdModelArchiveResult>;

interface PlaylistModelSource {
    id: string | number;
    name: string;
    filePath: string;
    thumbnailPath?: string | null;
}
interface PlaylistMotionSource {
    id: string | number;
    name?: string;
    filePath: string;
}
interface BuildMmdPlaylistOptions {
    playlistId: string;
    playlistName?: string;
    models: PlaylistModelSource[];
    motions?: PlaylistMotionSource[];
    limit?: number;
    loop?: boolean;
    preload?: 'none' | 'next' | 'all';
    autoPlay?: boolean;
    nodeDuration?: number;
    normalizeUrl?: (pathOrUrl: string) => string;
}
/**
 * 根据数据库中的模型/动作记录快速构建 MMDPlaylistConfig
 */
declare function buildMmdPlaylistFromSources(options: BuildMmdPlaylistOptions): MMDPlaylistConfig;

/**
 * MMD 资源上传辅助函数
 *
 * 整合 UniversalFileService 用于 MMD 资源上传
 */

declare const MMD_SUPPORTED_TYPES: {
    model: ("application/zip" | "application/x-zip-compressed" | "multipart/x-zip")[];
    animation: string[];
    audio: string[];
};
declare const MMD_FILE_EXTENSIONS: {
    model: string[];
    animation: string[];
    audio: string[];
};
interface MmdUploadOptions {
    file: File;
    resourceType: 'model' | 'animation' | 'audio';
    name: string;
    description?: string;
    userId: string;
}
interface MmdUploadResult {
    id: string;
    name: string;
    url: string;
    filePath: string;
    fileSize: number;
    type: string;
    format: string;
    uploadTime: Date;
    metadata?: FileMetadata;
}
/**
 * 使用 UniversalFileService 上传 MMD 资源
 *
 * @param fileService - UniversalFileService 实例
 * @param options - 上传选项
 * @returns 上传结果
 */
declare function uploadMmdResource(fileService: UniversalFileService, options: MmdUploadOptions): Promise<MmdUploadResult>;
/**
 * 上传 MMD 模型 (ZIP 压缩包)
 *
 * @param fileService - UniversalFileService 实例
 * @param options - 上传选项
 * @returns 上传结果,包含解压后的模型路径
 */
declare function uploadMmdModel(fileService: UniversalFileService, options: MmdUploadOptions & {
    storageRoot: string;
    publicRoot: string;
}): Promise<MmdUploadResult & {
    extractedPath?: string;
}>;
/**
 * 批量上传 MMD 资源
 *
 * @param fileService - UniversalFileService 实例
 * @param uploads - 上传选项数组
 * @returns 上传结果数组
 */
declare function batchUploadMmdResources(fileService: UniversalFileService, uploads: MmdUploadOptions[]): Promise<MmdUploadResult[]>;

export { type BuildMmdPlaylistOptions, MMD_FILE_EXTENSIONS, MMD_MODEL_ARCHIVE_MIME_TYPES, MMD_SUPPORTED_TYPES, type MmdUploadOptions, type MmdUploadResult, type PlaylistModelSource, type PlaylistMotionSource, type ProcessMmdModelArchiveOptions, type ProcessMmdModelArchiveResult, type SupportedModelFormat, batchUploadMmdResources, buildMmdPlaylistFromSources, processMmdModelArchive, uploadMmdModel, uploadMmdResource };
