import { API } from '@editorjs/editorjs'; import { CardWithSelectConfig } from '../types/card-with-select-config.interface'; import { FileHandler } from './file-handler'; import { SelectManager } from './select-manager'; import { DOMRenderer } from './dom-renderer'; /** * Manager for entity operations */ declare class EntityManager { private api; private config; private fileHandler; private selectManager; private domRenderer; constructor(api: API, config: CardWithSelectConfig, fileHandler: FileHandler, selectManager: SelectManager, domRenderer: DOMRenderer); /** * Create entity object * @param linkType - type of link */ createEntity(linkType: string): any; /** * Setup entity events * @param entity - entity object * @param parentElement - parent element */ setupEntityEvents(entity: any, parentElement: HTMLElement): void; /** * Setup file events * @param entity - entity object */ private setupFileEvents; /** * Setup drag and drop prevention * Настроить предотвращение drag and drop * @param entity - entity object / объект сущности */ private setupDragAndDropPrevention; /** * Handle file upload * Обработать загрузку файла * @param file - file to upload / файл для загрузки * @param entity - entity object / объект сущности */ private handleFileUpload; /** * Get CSS classes * Получить CSS классы */ private getCSSClasses; /** * Populate entity with data * Заполнить сущность данными * @param entity - entity object / объект сущности * @param title - title text / текст заголовка * @param description - description text / текст описания * @param entityId - entity ID / ID сущности * @param customLink - custom link / произвольная ссылка * @param file - file data / данные файла */ populateEntity(entity: any, title: string, description: string, entityId: string | null, customLink?: string, file?: { url: string; name: string; size?: number; }): void; /** * Assemble entity in DOM * Собрать сущность в DOM * @param entity - entity object / объект сущности * @param parentElement - parent element / родительский элемент */ assembleEntityInDOM(entity: any, parentElement: HTMLElement): HTMLElement; /** * Check if link type is a configurable type * Проверяет, является ли тип ссылки настраиваемым типом * @param linkType - type to check / тип для проверки */ private isConfigurableType; /** * Get configurable type configuration * Получить конфигурацию настраиваемого типа * @param linkType - type key / ключ типа */ private getConfigurableType; } export { EntityManager };