import { type Bounds, PainterModule } from "../../../common/painter/painter"; import { type Theme } from "../../../common/painter/theme"; import { type Folder, type FolderScores } from "../../lib/types"; import type { CanvasRenderingContext2D } from "canvas"; import { type Chart, type Database } from "gcm-database/maimai"; import z from "zod/v4"; export interface FolderModulePainterContext { folders: Folder[]; /** * A chart without a score is drawn without a lamp. */ scores: FolderScores; } export declare class FolderModule extends PainterModule { private database; static readonly SCHEMA: z.ZodObject<{ x: z.ZodNumber; y: z.ZodNumber; id: z.ZodOptional; anchor: z.ZodOptional; location: z.ZodDefault>; }, z.core.$strip>>; type: z.ZodLiteral<"folder">; width: z.ZodNumber; height: z.ZodNumber; margin: z.ZodNumber; gap: z.ZodNumber; horizontalSize: z.ZodNumber; color: z.ZodObject<{ card: z.ZodString; }, z.core.$strip>; title: z.ZodObject<{ size: z.ZodNumber; gap: z.ZodNumber; borderColor: z.ZodString; }, z.core.$strip>; jacket: z.ZodObject<{ size: z.ZodNumber; gap: z.ZodNumber; margin: z.ZodNumber; }, z.core.$strip>; check: z.ZodPrefault; tickColor: z.ZodDefault; size: z.ZodDefault; }, z.core.$strip>>; bubble: z.ZodObject<{ color: z.ZodObject<{ basic: z.ZodString; advanced: z.ZodString; expert: z.ZodString; master: z.ZodString; remaster: z.ZodString; utage: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; sprites: z.ZodObject<{ achievement: z.ZodObject<{ d: z.ZodString; c: z.ZodString; b: z.ZodString; bb: z.ZodString; bbb: z.ZodString; a: z.ZodString; aa: z.ZodString; aaa: z.ZodString; s: z.ZodString; sp: z.ZodString; ss: z.ZodString; ssp: z.ZodString; sss: z.ZodString; sssp: z.ZodString; }, z.core.$strip>; milestone: z.ZodObject<{ ap: z.ZodString; app: z.ZodString; fc: z.ZodString; fcp: z.ZodString; fdx: z.ZodString; fdxp: z.ZodString; fs: z.ZodString; fsp: z.ZodString; sync: z.ZodString; none: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>; constructor(database: Database); private getBubbleColorByDifficulty; private getAchievementRankImagePath; private getComboLampImagePath; private getSyncLampImagePath; private getGridWidth; private getFolderHeight; private getContentHeight; private drawJacket; /** * Dim the jacket, so that a lamp centered on it stays readable on top of a bright jacket. */ private drawLampScrim; /** * Draw a sprite of the given width at the center of the jacket. */ private drawCenteredSprite; private drawAchievementRank; private drawLampSprite; private drawLampText; private drawLamp; /** * Draw a badge with a tick on the top right corner of the jacket. It is drawn outside of the clip of the jacket, * so the rounded corner of the jacket never cuts it. */ private drawCheck; private drawCell; private drawFolder; getBounds(_ctx: CanvasRenderingContext2D, _theme: Theme, element: z.infer, painterCtx: FolderModulePainterContext): Promise; draw(ctx: CanvasRenderingContext2D, theme: Theme, element: z.infer, painterCtx: FolderModulePainterContext): Promise; }