package com.knecon.fforesight.service.layoutparser.processor.model;

public enum PageBlockType {
    H1,
    H2,
    H3,
    H4,
    H5,
    H6,
    HEADER,
    FOOTER,
    TITLE,
    PARAGRAPH,
    PARAGRAPH_BOLD,
    PARAGRAPH_ITALIC,
    PARAGRAPH_UNKNOWN,
    OTHER,
    TABLE;


    public static PageBlockType getHeadlineType(int i) {

        return switch (i) {
            case 1 -> PageBlockType.H1;
            case 2 -> PageBlockType.H2;
            case 3 -> PageBlockType.H3;
            case 4 -> PageBlockType.H4;
            case 5 -> PageBlockType.H5;
            default -> PageBlockType.H6;
        };
    }


    public boolean isHeadline() {

        return this.equals(H1) || this.equals(H2) || this.equals(H3) || this.equals(H4) || this.equals(H5) || this.equals(H6);
    }
}
