using NPOI.SS.UserModel;

namespace YBEE.EQM.Application;

/// <summary>
/// 导出单元格样式
/// </summary>
public class ExportExcelCellStyle
{
    public IDataFormat DataFormat { get; set; }

    /// <summary>
    /// 标题字段
    /// </summary>
    public string TitleFontName { get; set; } = "黑体";
    /// <summary>
    /// 常规字段
    /// </summary>
    public string FontName { get; set; } = "宋体";

    /// <summary>
    /// 百分比
    /// </summary>
    public ICellStyle PercentCellStyleP2 { get; set; }
    /// <summary>
    /// 数字两位小数
    /// </summary>
    public ICellStyle NumberCellStyleP2 { get; set; }
    /// <summary>
    /// 数字四位小数
    /// </summary>
    public ICellStyle NumberCellStyleP4 { get; set; }

    /// <summary>
    /// 标题样式
    /// </summary>
    public ICellStyle TitleStyle { get; set; }
    /// <summary>
    /// 摘要样式
    /// </summary>
    public ICellStyle SummaryStyle { get; set; }
    /// <summary>
    /// 列头样式
    /// </summary>
    public ICellStyle ColumnHeaderStyle { get; set; }
    /// <summary>
    /// 带背景列头样式
    /// </summary>
    public ICellStyle ColumnFillHeaderStyle { get; set; }
    
    /// <summary>
    /// 居中对齐
    /// </summary>
    public ICellStyle CenterCellStyle { get; set; }
    /// <summary>
    /// 居左对齐
    /// </summary>
    public ICellStyle LeftCellStyle { get; set; }
    /// <summary>
    /// 居右对齐
    /// </summary>
    public ICellStyle RightCellStyle { get; set; }

    /// <summary>
    /// 居中对齐（自动换行）
    /// </summary>
    public ICellStyle CenterWrapCellStyle { get; set; }
    /// <summary>
    /// 居左对齐（自动换行）
    /// </summary>
    public ICellStyle LeftWrapCellStyle { get; set; }
    /// <summary>
    /// 居右对齐（自动换行）
    /// </summary>
    public ICellStyle RightWrapCellStyle { get; set; }

    /// <summary>
    /// 填充样式
    /// </summary>
    public ICellStyle FillCellStyle { get; set; }

    /// <summary>
    /// 默认标题高度
    /// </summary>
    public static readonly short DefaultTitleHeight = 50 * 20;
    /// <summary>
    /// 默认行高
    /// </summary>
    public static readonly short DefaultRowHeight = 15 * 20;
}