// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY = new TableCellStyleDefaultBody(false, false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_BOLD = new TableCellStyleDefaultBody(false, true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_CENTER = new TableCellStyleDefaultBody(true, false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_CENTER_BOLD = new TableCellStyleDefaultBody(true, true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_FOOTER = new TableCellStyleDefaultFooter(false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_FOOTER_BOLD = new TableCellStyleDefaultFooter(true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_HEADER = new TableCellStyleDefaultHeader(false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_HEADER_BOLD = new TableCellStyleDefaultHeader(true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/util/WorkbookUtil.java
// public static Color toAwtColor(final HSSFColor hssfColor) {
//     short[] rgb = hssfColor.getTriplet();
//     return new Color(rgb[0], rgb[1], rgb[2]);
// }
// 
// Path: src/main/java/br/com/tecsinapse/dataio/util/WorkbookUtil.java
// public static XSSFColor toXSSFColor(final HSSFColor hssfColor) {
//     return new XSSFColor(Color.decode(StyleColorUtil.toHexColor(hssfColor)), new DefaultIndexedColorMap());
// }


import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_CENTER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_CENTER_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_FOOTER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_FOOTER_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_HEADER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_HEADER_BOLD;
import static br.com.tecsinapse.dataio.util.WorkbookUtil.toAwtColor;
import static br.com.tecsinapse.dataio.util.WorkbookUtil.toXSSFColor;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.DefaultIndexedColorMap;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFColor;
import org.apache.poi.xssf.usermodel.XSSFFont;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
            cellStyle = border.toCellStyle(cellStyle);
        }
        if (getVAlign() != null) {
            cellStyle.setVerticalAlignment(vAlign.getCellStyleVAlign());
        }
        if (getHAlign() != null) {
            cellStyle.setAlignment(hAlign.getCellStyleHAlign());
        }

        cellStyle.setWrapText(isWrapText());

        Font font = wb.createFont();
        configFont(font);
        cellStyle.setFont(font);
        if (cellFormat != null && !cellFormat.isEmpty()) {
            cellStyle.setDataFormat(wb.createDataFormat().getFormat(cellFormat));
        }
        return cellStyle;
    }

    private void configFont(Font font) {
        font.setBold(isBold());
        font.setItalic(isItalic());
        font.setStrikeout(isStrikeout());
        font.setUnderline(isUnderline() ? Font.U_SINGLE : Font.U_NONE);
        if (getFontSize() != null) {
            font.setFontHeightInPoints(fontSize.shortValue());
        }
        if (getFontColor() != null) {
            if (font instanceof XSSFFont) {
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY = new TableCellStyleDefaultBody(false, false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_BOLD = new TableCellStyleDefaultBody(false, true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_CENTER = new TableCellStyleDefaultBody(true, false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_BODY_CENTER_BOLD = new TableCellStyleDefaultBody(true, true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_FOOTER = new TableCellStyleDefaultFooter(false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_FOOTER_BOLD = new TableCellStyleDefaultFooter(true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_HEADER = new TableCellStyleDefaultHeader(false);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/style/Style.java
// public static final TableCellStyle TABLE_CELL_STYLE_HEADER_BOLD = new TableCellStyleDefaultHeader(true);
// 
// Path: src/main/java/br/com/tecsinapse/dataio/util/WorkbookUtil.java
// public static Color toAwtColor(final HSSFColor hssfColor) {
//     short[] rgb = hssfColor.getTriplet();
//     return new Color(rgb[0], rgb[1], rgb[2]);
// }
// 
// Path: src/main/java/br/com/tecsinapse/dataio/util/WorkbookUtil.java
// public static XSSFColor toXSSFColor(final HSSFColor hssfColor) {
//     return new XSSFColor(Color.decode(StyleColorUtil.toHexColor(hssfColor)), new DefaultIndexedColorMap());
// }


// Path: src/main/java/br/com/tecsinapse/dataio/style/TableCellStyle.java
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_CENTER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_BODY_CENTER_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_FOOTER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_FOOTER_BOLD;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_HEADER;
import static br.com.tecsinapse.dataio.style.Style.TABLE_CELL_STYLE_HEADER_BOLD;
import static br.com.tecsinapse.dataio.util.WorkbookUtil.toAwtColor;
import static br.com.tecsinapse.dataio.util.WorkbookUtil.toXSSFColor;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.DefaultIndexedColorMap;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFColor;
import org.apache.poi.xssf.usermodel.XSSFFont;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

            cellStyle = border.toCellStyle(cellStyle);
        }
        if (getVAlign() != null) {
            cellStyle.setVerticalAlignment(vAlign.getCellStyleVAlign());
        }
        if (getHAlign() != null) {
            cellStyle.setAlignment(hAlign.getCellStyleHAlign());
        }

        cellStyle.setWrapText(isWrapText());

        Font font = wb.createFont();
        configFont(font);
        cellStyle.setFont(font);
        if (cellFormat != null && !cellFormat.isEmpty()) {
            cellStyle.setDataFormat(wb.createDataFormat().getFormat(cellFormat));
        }
        return cellStyle;
    }

    private void configFont(Font font) {
        font.setBold(isBold());
        font.setItalic(isItalic());
        font.setStrikeout(isStrikeout());
        font.setUnderline(isUnderline() ? Font.U_SINGLE : Font.U_NONE);
        if (getFontSize() != null) {
            font.setFontHeightInPoints(fontSize.shortValue());
        }
        if (getFontColor() != null) {
            if (font instanceof XSSFFont) {
                ((XSSFFont)font).setColor(toXSSFColor(fontColor));