analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
26 lines • 1.3 kB
TypeScript
import type { ForumApiClient } from '../types/forum';
import { PROFILE_ROLES } from '../types/chat';
export type ForumProps = {
/** API client with forum CRUD methods */
readonly apiClient: ForumApiClient;
/** Current user's userInstitutionId — used to identify own posts */
readonly currentUserId: string;
/** User role — enables professor-specific features (e.g. grade question on create) */
readonly userRole?: PROFILE_ROLES.STUDENT | PROFILE_ROLES.TEACHER;
/** Forum page title */
readonly title?: string;
/** Forum page subtitle */
readonly subtitle?: string;
/** Callback to upload an image file and return its hosted URL */
readonly onUploadImage?: (file: File) => Promise<string>;
/**
* Callback to evaluate a reply (teacher only).
* If provided, an "Avaliar" button appears on each reply when the topic counts for grade.
*/
readonly onEvaluateReply?: (replyId: string, grade: number) => Promise<void>;
/** Additional CSS classes */
readonly className?: string;
};
export declare function Forum({ apiClient, currentUserId, userRole, title, subtitle, onUploadImage, onEvaluateReply, className, }: ForumProps): import("react/jsx-runtime").JSX.Element;
export default Forum;
//# sourceMappingURL=Forum.d.ts.map