UNPKG

@churchapps/helpers

Version:

Library of helper functions not specific to any one ChurchApps project or framework.

25 lines 1.17 kB
import type { PlanInterface, PlanItemInterface } from "./interfaces/index.js"; import type { ContentProviderInterface } from "./contentProviders/ContentProvider.js"; import { LessonsContentProvider } from "./contentProviders/LessonsContentProvider.js"; export declare class PlanHelper { private static providers; static registerProvider(provider: ContentProviderInterface): void; static replaceProvider(provider: ContentProviderInterface): void; static populate(plan: PlanInterface, planItems: PlanItemInterface[]): Promise<PlanItemInterface[]>; private static flattenItems; private static attachContent; static getLessonsProvider(): LessonsContentProvider; /** * Format seconds as MM:SS string * @param seconds - Number of seconds to format * @returns Formatted time string (e.g., "3:45") */ static formatTime(seconds: number): string; /** * Calculate total duration of a section's children * @param section - PlanItem with children * @returns Total seconds from all children */ static getSectionDuration(section: PlanItemInterface): number; } //# sourceMappingURL=PlanHelper.d.ts.map