UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

46 lines 1.93 kB
import type { ColumnConfig } from '../../../TableProvider/index'; import type { SubjectEnum } from '../../../enums/SubjectEnum'; /** * Base model item interface - all model types must extend this. * Includes index signature for TableProvider compatibility. */ export interface BaseModelItem { id: string; title: string; subject?: string | { id: string; subjectName?: string; subjectIcon?: string; subjectColor?: string; name?: string; icon?: string; color?: string; } | null; savedAt?: string; [key: string]: unknown; } /** * Configuration for model columns labels and accessibility */ export interface ModelsColumnsConfig { /** Send button label (e.g., "Enviar aula", "Enviar atividade") */ sendButtonLabel: string; /** Send button aria-label */ sendButtonAriaLabel: string; /** Delete button aria-label */ deleteButtonAriaLabel: string; /** Edit button aria-label */ editButtonAriaLabel: string; } /** * Creates base table columns configuration for models. * Can be used by both RecommendedClassModels and ActivityModels with type-safe generics. * @param mapSubjectNameToEnum - Optional function to map subject names to enum values * @param onSend - Callback when send button is clicked * @param onEdit - Callback when edit button is clicked * @param onDelete - Callback when delete button is clicked * @param config - Configuration for labels and accessibility * @returns Array of column configurations for the models table */ export declare const createModelsTableColumnsBase: <T extends BaseModelItem>(mapSubjectNameToEnum: ((name: string) => SubjectEnum | null) | undefined, onSend: ((model: T) => void) | undefined, onEdit: ((model: T) => void) | undefined, onDelete: (model: T) => void, config: ModelsColumnsConfig) => ColumnConfig<T>[]; //# sourceMappingURL=createModelsTableColumnsBase.d.ts.map