analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
58 lines • 2.33 kB
TypeScript
import type { LessonDetailsData } from '../types/recommendedLessons';
import type { SubjectEnum } from '../enums/SubjectEnum';
import type { BaseApiClient } from '../types/api';
import { type BreadcrumbItem, type LessonDetailsLabels } from './types/index';
/**
* Props for RecommendedLessonDetails component
*/
export interface RecommendedLessonDetailsProps {
/** Lesson data to display (from API responses) */
data: LessonDetailsData | null;
/** Loading state */
loading?: boolean;
/** Error message */
error?: string | null;
/** Callback when "Ver aula" button is clicked */
onViewLesson?: () => void;
/**
* API client for making requests.
* When provided, enables the "Corrigir atividade" functionality.
*/
apiClient?: BaseApiClient;
/** Callback for breadcrumb navigation */
onBreadcrumbClick?: (path: string) => void;
/** Function to map subject name to SubjectEnum */
mapSubjectNameToEnum?: (name: string) => SubjectEnum | null;
/** Custom breadcrumb items */
breadcrumbs?: BreadcrumbItem[];
/** Custom labels */
labels?: Partial<LessonDetailsLabels>;
/** Additional CSS classes */
className?: string;
}
/**
* RecommendedLessonDetails component
*
* Displays detailed information about a recommended lesson including:
* - Breadcrumb navigation
* - Lesson metadata (title, dates, school, subject, class)
* - Results cards (completion %, best result topic, hardest topic)
* - Students table with status, progress, and actions
*
* @example
* ```tsx
* <RecommendedLessonDetails
* data={{
* recommendedClass: recommendedClassData, // from /recommendedClass/{id}
* details: detailsData, // from /recommendedClass/{id}/details
* breakdown: breakdown, // optional, from /recommended-class/history
* }}
* apiClient={api}
* onViewLesson={() => navigate('/view-lesson')}
* mapSubjectNameToEnum={mapSubjectNameToEnum}
* />
* ```
*/
declare const RecommendedLessonDetails: ({ data, loading, error, onViewLesson, apiClient, onBreadcrumbClick, mapSubjectNameToEnum, breadcrumbs, labels: customLabels, className, }: RecommendedLessonDetailsProps) => import("react/jsx-runtime").JSX.Element | null;
export default RecommendedLessonDetails;
//# sourceMappingURL=RecommendedLessonDetails.d.ts.map