package com.iqser.red.service.persistence.management.v1.processor.dataexchange;

import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.FileType;

import lombok.AccessLevel;
import lombok.experimental.FieldDefaults;

@FieldDefaults(makeFinal = true, level = AccessLevel.PUBLIC)
public class FileExchangeNames {

    public static String TEMPLATE_FOLDER = "DOSSIER_TEMPLATE";
    public static String DOSSIER_ENTITY_FOLDER = "ENTITIES";

    public static String DOSSIER = "DOSSIER.json";
    public static String FILE_ATTRIBUTES = "FILE_ATTRIBUTE.json";
    public static String FILE_STATUS = "FILE_STATUS.json";
    public static String MANUAL_REDACTIONS = "MANUAL_REDACTIONS.json";
    public static String COMPONENT_OVERRIDES = "COMPONENT_OVERRIDES.JSON";

    public static Definition COMPONENT_LOG = new Definition(FileType.COMPONENT_LOG);
    public static Definition ENTITY_LOG = new Definition(FileType.ENTITY_LOG);

    public static Definition STRUCTURE = new Definition(FileType.DOCUMENT_STRUCTURE);
    public static Definition PAGES = new Definition(FileType.DOCUMENT_PAGES);
    public static Definition CHUNKS = new Definition(FileType.DOCUMENT_CHUNKS);
    public static Definition TEXT = new Definition(FileType.DOCUMENT_TEXT);
    public static Definition POSITIONS = new Definition(FileType.DOCUMENT_POSITION);
    public static Definition SIMPLIFIED_TEXT = new Definition(FileType.SIMPLIFIED_TEXT);
    public static Definition NER_ENTITIES = new Definition(FileType.NER_ENTITIES);
    public static Definition LLM_NER_ENTITIES = new Definition(FileType.LLM_NER_ENTITIES);
    public static Definition AZURE_NER_ENTITIES = new Definition(FileType.AZURE_NER_ENTITIES);

    public static Definition TABLES = new Definition(FileType.TABLES);
    public static Definition IMAGES = new Definition(FileType.IMAGE_INFO);
    public static Definition VISUAL_LAYOUT = new Definition(FileType.VISUAL_LAYOUT);
    public static Definition IMPORTED = new Definition(FileType.IMPORTED_REDACTIONS);
    public static Definition HIGHLIGHTS = new Definition(FileType.TEXT_HIGHLIGHTS);
    public static Definition FIGURE = new Definition(FileType.FIGURE);

    public static Definition ORIGIN = new Definition(FileType.ORIGIN);
    public static Definition UNTOUCHED = new Definition(FileType.UNTOUCHED);
    public static Definition VIEWER = new Definition(FileType.VIEWER_DOCUMENT);

    public record Definition(FileType fileType) {

        public String getName() {

            return fileType.name() + fileType.getExtension();
        }

    }

}
