<?php

namespace App\Enums;

use BenSampo\Enum\Enum;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Fill;

final class ExcelDesignEnum extends Enum
{
    const NO_FORMAT = [
    ];

    const DEFAULT_TITLE = [
        'font' => [
            'bold'      =>  true,
            'size'      =>  14,
            'color' => ['rgb' => '000000'],
        ],
    ];
    const DEFAULT = [
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
    ];

    const DEFAULT_HEADER = [
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
        'alignment' => [
            'horizontal' => 'center'
        ],
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => '0c54a4',
            ]
        ],
        'font' => [
            'bold'      =>  true,
            'size'      =>  11,
            'color' => ['rgb' => 'FFFFFF'],
        ],
    ];

    const SUB_HEADER = [
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
        'alignment' => [
            'horizontal' => 'center'
        ],
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => '2672c7',
            ]
        ],
        'font' => [
            'bold'      =>  true,
            'size'      =>  11,
            'color' => ['rgb' => 'FFFFFF'],
        ],
    ];

    const DEFAULT_TOTAL = [
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => 'c74126',
            ]
        ],
        'font' => [
            'bold'      =>  true,
            'size'      =>  11,
            'color' => ['rgb' => 'FFFFFF'],
        ],
    ];

    const KHR_CURRENCY = '#,##0';

    const GENERAL_CURRENCY = '_(* #,##0_);_(* (#,##0);_(* "-"??_);_(@_)';

    const GENERAL_CURRENCY_ = '_(* #,##0_);_(* (#,##0);_(* "0"??_);_(@_)';

    const TITLE  = array(
        'alignment' => array(
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical' => Alignment::VERTICAL_CENTER
        ),
         'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => 'f3f3f3',
            ]
        ],
    );

    const BORDER = array(
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
    );

    const HEADER = array(
        'font' => array('size' => 14),
        'alignment' => array(
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical' => Alignment::VERTICAL_CENTER
        )
    );

    const SECTION = array(
        'alignment' => array(
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical' => Alignment::VERTICAL_CENTER
        ),
        'font' => [
            'bold'      =>  true,
            'size'      =>  12,
            'color' => ['rgb' => '000000'],
        ],
    );

    const LIGHT_SECTION = array(
        'alignment' => array(
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical' => Alignment::VERTICAL_CENTER
        ),
        'font' => [
            'size'      =>  12,
            'color' => ['rgb' => '000000'],
        ],
    );

    const SECTION_BORDER = array(
        'alignment' => array(
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical' => Alignment::VERTICAL_CENTER
        ),
        'font' => [
            'bold'      =>  true,
            'size'      =>  12,
        ],
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
    );

    const HIGHLIGHT = array(
        'font' => array('bold' => true),
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => 'E8F0FF',
            ]
        ],
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
        'alignment' => array(
            'vertical' => Alignment::VERTICAL_CENTER
        )
    );

    const GRAY_HEADER = array(
        'font' => array('bold' => true),
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => 'DDDDDD',
            ]
        ],
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => 'AAAAAA'],
            ],
        ],
        'alignment' => array(
            'vertical' => Alignment::VERTICAL_CENTER,
            'horizontal' => Alignment::HORIZONTAL_CENTER,
        )
    );

    const FOOTER = array(
        'font' => array('bold' => true)
    );

    CONST FONT_KHMER = array(
        'font' => array(
            'name'  => 'Khmer OS'
        )
    );

    CONST ALIGNMENT = [
        'alignment' => array(
            'vertical' => Alignment::VERTICAL_CENTER,
            'horizontal' => Alignment::HORIZONTAL_CENTER,
        )
    ];

    const BOLD_BORDER = array(
        'borders' => [
            'allBorders' => [
                'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
                'color' => ['rgb' => '000000'],
            ],
        ],
    );

    const TEXT_BOLD = array(
        'font' => array('bold' => true)
    );

    const YELLOW_BACKGROUND = array(
        'fill' => [
            'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
            'color' => [
                'rgb' => 'FAFAD2',
            ]
        ]
    );
    
    CONST VERTICAL_ALIGNMENT = [
        'alignment' => array(
            'vertical' => Alignment::VERTICAL_CENTER,
        )
    ];

    CONST FONT_KH_OS_SIEMREAP = 'Khmer OS Siemreap';

    CONST FONT_SIZE = 11;
}
