// 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;
        return this.equals(TABLE_CELL_STYLE_FOOTER) || this.equals(TABLE_CELL_STYLE_FOOTER_BOLD);
    }

    public String getCssStyle() {
        if (ignoreCssStyle) {
            return null;
        }
        StringBuilder css = new StringBuilder();
        if (getBackgroundColor() != null) {
            css.append(CssStyle.toBackgroundColor(backgroundColor, cssWhiteAsTransparent));
        }
        if (getBorder() != null) {
            css.append(border.toCss());
        }
        if (getVAlign() != null) {
            css.append(vAlign.getCss());
        }
        if (getHAlign() != null) {
            css.append(hAlign.getCss());
        }
        configCssFont(css);
        return css.length() > 0 ? css.toString() : null;
    }

    public CellStyle toCellStyle(Workbook wb) {
        CellStyle cellStyle = wb.createCellStyle();

        final HSSFColor bgColor = getBackgroundColor();
        if (bgColor != null) {
            if (cellStyle instanceof XSSFCellStyle) {
// 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;

        return this.equals(TABLE_CELL_STYLE_FOOTER) || this.equals(TABLE_CELL_STYLE_FOOTER_BOLD);
    }

    public String getCssStyle() {
        if (ignoreCssStyle) {
            return null;
        }
        StringBuilder css = new StringBuilder();
        if (getBackgroundColor() != null) {
            css.append(CssStyle.toBackgroundColor(backgroundColor, cssWhiteAsTransparent));
        }
        if (getBorder() != null) {
            css.append(border.toCss());
        }
        if (getVAlign() != null) {
            css.append(vAlign.getCss());
        }
        if (getHAlign() != null) {
            css.append(hAlign.getCss());
        }
        configCssFont(css);
        return css.length() > 0 ? css.toString() : null;
    }

    public CellStyle toCellStyle(Workbook wb) {
        CellStyle cellStyle = wb.createCellStyle();

        final HSSFColor bgColor = getBackgroundColor();
        if (bgColor != null) {
            if (cellStyle instanceof XSSFCellStyle) {
                ((XSSFCellStyle)cellStyle).setFillForegroundColor(new XSSFColor(toAwtColor(bgColor),