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

import org.springframework.stereotype.Service;

import com.knecon.fforesight.service.layoutparser.internal.api.queue.LayoutParsingType;

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

@Service
@RequiredArgsConstructor
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
public class LayoutParsingTypeProvider {

    CurrentApplicationTypeProvider currentApplicationTypeProvider;

    public LayoutParsingType deferFromCurrentApplicationType() {

        return switch (currentApplicationTypeProvider.get()) {
            case DocuMine -> LayoutParsingType.DOCUMINE_OLD;
            case Clarifynd -> LayoutParsingType.CLARIFYND;
            default -> LayoutParsingType.REDACT_MANAGER_WITHOUT_DUPLICATE_PARAGRAPH;
        };
    }

}
