package com.knecon.fforesight.service.viewerdoc.layers;

import java.awt.Color;
import java.util.List;

import com.knecon.fforesight.service.viewerdoc.LayerIdentifier;
import com.knecon.fforesight.service.viewerdoc.model.Standard14EmbeddableFont;
import com.knecon.fforesight.service.viewerdoc.model.Visualizations;

import lombok.Getter;

public class LayoutGridLayerConfig extends AbstractLayerGroup {

    @Getter
    public final LayerIdentifier groupIdentifier = LayerIdentifier.KNECON_LAYOUT;

    public static final LayerGroup CONFIG_INSTANCE = new LayoutGridLayerConfig();

    protected static final float FONT_SIZE = 10f;
    protected static final float LINE_WIDTH = 1f;
    protected static final Standard14EmbeddableFont FONT = Standard14EmbeddableFont.helvetica();

    protected static final Color INNER_LINES_COLOR = new Color(255, 175, 175);
    protected static final Color HEADER_CELL_COLOR = new Color(156, 21, 48);
    protected static final Color PARAGRAPH_COLOR = new Color(70, 130, 180);

    protected static final Color DUPLICATE_PARAGRAPH_COLOR = new Color(70, 180, 101);
    protected static final Color TABLE_COLOR = new Color(102, 205, 170);
    protected static final Color SECTION_COLOR = new Color(50, 50, 50);
    protected static final Color HEADLINE_COLOR = new Color(162, 56, 56);
    protected static final Color HEADER_COLOR = new Color(171, 131, 6);
    protected static final Color IMAGE_COLOR = new Color(253, 63, 146);
    protected static final Color TREEID_COLOR = new Color(53, 53, 53);
    protected static final Color KEY_VALUE_BBOX_COLOR = new Color(0, 39, 85);
    protected static final Color KEY_COLOR = new Color(30, 92, 172);
    protected static final Color VALUE_COLOR = new Color(30, 172, 146);
    protected static final Color TOC_COLOR = new Color(0, 86, 198);

    protected final Visualizations sections = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_SECTION).visibleByDefault(true).build();
    protected final Visualizations toc = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_TOC).visibleByDefault(true).build();
    protected final Visualizations paragraphs = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_PARAGRAPH).visibleByDefault(true).build();
    protected final Visualizations headlines = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_HEADLINE).visibleByDefault(true).build();
    protected final Visualizations tables = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_TABLE).visibleByDefault(true).build();
    protected final Visualizations figures = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_FIGURES).visibleByDefault(true).build();
    protected final Visualizations headerFooter = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_HEADER_FOOTER).visibleByDefault(true).build();
    protected final Visualizations images = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_IMAGES).build();
    protected final Visualizations keyValue = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_KEY_VALUE).build();
    protected final Visualizations treeIds = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_TREE_IDs).build();
    protected final Visualizations versionAndType = Visualizations.builder().layer(LayerIdentifier.KNECON_LAYOUT_VERSION_AND_TYPE).build();


    @Override
    public List<Visualizations> getVisualizations() {

        return List.of(headlines, paragraphs, tables, sections, headerFooter, toc, keyValue, figures, images, treeIds, versionAndType);
    }

}
