{
"propertyTemplates":[
		{
			"placeholder" : "{{Property_Header_Here}}",
			"condition" : "{{Property_Listed_Here}} == true",
			"templates" : [
					{
					"type" : "default",
					"content" : ",
                        L(\"{{Property_Name_Here}}\")"
					}
				]
		},
		{
			"placeholder" : "{{Property_Header_And_Value_Here}}",
			"condition" : "{{Property_Listed_Here}} == true",
			"templates" : [
					{
						"type" : "default",
						"content" : "{\"{{Property_Name_Here}}\", {{entity_Name_Here}}.{{Entity_Name_Here}}.{{Property_Name_Here}}},
						"
					}
				]
		},		
		{
			"placeholder" : "{{Property_DateTime_Formatter_Here_Before_080400}}",
			"condition" : "{{Property_Listed_Here}} == true && {{Project_Version_Here}} < 080400",
			"templates" : [
					{
					"type" : "DateTime",
					"content" : "var {{property_Name_Here}}Column = sheet.Column({{Loop_Index}});
                    {{property_Name_Here}}Column.Style.Numberformat.Format = \"yyyy-mm-dd\";
					{{property_Name_Here}}Column.AutoFit();
					"
					},
					{
					"type" : "default",
					"content" : ""
					}
				]
		},
		{
			"placeholder" : "{{Property_DateTime_Formatter_Here_After_080400}}",
			"condition" : "{{Property_Listed_Here}} == true && {{Project_Version_Here}} >= 080400",
			"templates" : [
					{
					"type" : "DateTime",
					"content" : "for (var i = 1; i <= {{entity_Name_Plural_Here}}.Count; i++)
                    {
                        SetCellDataFormat(sheet.GetRow(i).Cells[{{Loop_Index}}-1], \"yyyy-mm-dd\");
                    }
                    sheet.AutoSizeColumn({{Loop_Index}}-1);"
					},
					{
					"type" : "default",
					"content" : ""
					}
				]
		},
		{
			"placeholder" : "{{Property_Params_Here}}",
			"condition" : "{{Property_Listed_Here}} == true",
			"templates" : [
					{
					"type" : "DateTime",
					"content" : ",
                        _ => _timeZoneConverter.Convert(_.{{Entity_Name_Here}}.{{Property_Name_Here}}, _abpSession.TenantId, _abpSession.GetUserId())"
					},
					{
					"type" : "file",
					"content" : ",
                        _ => _.{{Entity_Name_Here}}.{{Property_Name_Here}}FileName"
					},
					{
					"type" : "default",
					"content" : ",
                        _ => _.{{Entity_Name_Here}}.{{Property_Name_Here}}"
					}
				]
		}
	],
"navigationPropertyTemplates":[
		{
			"placeholder" : "{{NP_Header_Here}}",
			"templates" : [
					{
					"relation" : "single",
					"content" : ",
                        (L(\"{{NP_Foreign_Entity_Name_Here}}\")) + L(\"{{NP_Display_Property_Name_Here}}\")"
					}
				]
		},
        {
            "placeholder" : "{{NP_Header_And_Value_Here}}",
            "templates" : [
                    {
                    "relation" : "single",
                    "content" : "{\"{{NP_Name_Here}}\", {{entity_Name_Here}}.{{Entity_Name_Here}}.{{NP_Name_Here}}},{\"{{NP_Foreign_Entity_Name_Here}}{{NP_Display_Property_Name_Here}}{{NP_Duplication_Number_Here}}\", {{entity_Name_Here}}.{{NP_Foreign_Entity_Name_Here}}{{NP_Display_Property_Name_Here}}{{NP_Duplication_Number_Here}}},
                    "
                    }
                ]
        },
		{
			"placeholder" : "{{NP_Params_Here}}",
			"templates" : [
					{
					"relation" : "single",
					"content" : ",
                        _ => _.{{NP_Foreign_Entity_Name_Here}}{{NP_Display_Property_Name_Here}}{{NP_Duplication_Number_Here}}"
					}
				]
		}
	],
	"conditionalTemplates":[
		{
			"placeholder": "{{Excel_Reporter_Base_Here}}",
			"condition": "{{Project_Version_Here}} >= 080400 && {{Project_Version_Here}} <= 120001",
			"content": "NpoiExcelExporterBase"
		},
		{
			"placeholder": "{{Excel_Reporter_Base_Here}}",
			"condition": "{{Project_Version_Here}} > 120001",
			"content": "MiniExcelExcelExporterBase"
		},
		{
			"placeholder": "{{Excel_Reporter_Base_Here}}",
			"condition": "{{Project_Version_Here}} >= 080400",
			"content": "EpPlusExcelExporterBase"
		},		
		{
			"placeholder": "{{Excel_Reporter_Using_Here}}",
			"condition": "{{Project_Version_Here}} < 080400",
			"content": "using {{Namespace_Here}}.DataExporting.Excel.EpPlus;"
		},
		{
			"placeholder": "{{Excel_Reporter_Using_Here}}",
			"condition": "{{Project_Version_Here}} >= 080400 && {{Project_Version_Here}} <= 120001",
			"content": "using {{Namespace_Here}}.DataExporting.Excel.NPOI;"
		},
		{
			"placeholder": "{{Excel_Reporter_Using_Here}}",
			"condition": "{{Project_Version_Here}} > 120001",
			"content": "using {{Namespace_Here}}.DataExporting.Excel.MiniExcel;"
		},		
		{
			"placeholder": "{{ExportToFile_Method_Content_Here}}",
			"condition": "{{Project_Version_Here}} <= 120001",
			"content": "return CreateExcelPackage(
					\"{{Entity_Name_Plural_Here}}.xlsx\",
					excelPackage =>
					{
						
						{{Sheet_Initialization_Here}}

						AddHeader(
							sheet{{Property_Header_Here}}{{NP_Header_Here}}
							);

						AddObjects(
							sheet, {{Add_Objects_Start_Index_Here}} {{entity_Name_Plural_Here}}{{Property_Params_Here}}{{NP_Params_Here}}
							);

						{{Property_DateTime_Formatter_Here_Before_080400}}
						{{Property_DateTime_Formatter_Here_After_080400}}
					});
				"
		},
        {
            "placeholder": "{{Property_Info_Helper_Constructor_Assignment_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": "_propertyInfoHelper = propertyInfoHelper;"
        },
        {
            "placeholder": "{{Property_Info_Helper_Constructor_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": ", IPropertyInfoHelper propertyInfoHelper"
        },
        {
            "placeholder": "{{Property_Info_Helper_Property_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": "private readonly IPropertyInfoHelper _propertyInfoHelper;"
        },
        {
            "placeholder": "{{List_Handle_Method_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": "private static string? HandleLists(PropertyInfo property, object item)
                    {
                        var propertyType = property.PropertyType;
            
                        if (!typeof(IEnumerable).IsAssignableFrom(propertyType) &&
                            !propertyType.IsGenericType &&
                            propertyType.GetGenericTypeDefinition() != typeof(List<>))
                        {
                        }
                        
                        var genericType = propertyType.GetGenericArguments()[0];
                        
                        // You can change the way the list is handled here
                        return string.Empty;
                    }
            "
        },
        {
            "placeholder": "{{Excel_Selected_Column_Parameter_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": ", List<string> selectedColumns"
        },
        {
            "placeholder": "{{ExportToFile_Method_Content_Here}}",
            "condition": "{{Project_Version_Here}} >= 130200",
            "content": "
                var items = new List<Dictionary<string, object>>();

                foreach (var {{entity_Name_Here}}ForViewDto in {{entity_Name_Plural_Here}})
                {
                    var item = {{entity_Name_Here}}ForViewDto.{{Entity_Name_Here}};
                
                    if (selectedColumns is { Count: 0 })
                    {
                        break;
                    }
    
                    var rowItem = new Dictionary<string, object>();
    
                    foreach (var selectedColumn in selectedColumns)
                    {
                        // if the property is found, it will be added to the list of items
                        if (typeof({{Entity_Name_Here}}Dto).GetProperty(selectedColumn) is { } property)
                        {
                            rowItem.Add(property.Name, _propertyInfoHelper.GetConvertedPropertyValue(property, item, HandleLists) ?? string.Empty);
                        }
                    }
    
                    items.Add(rowItem);
                }

                return CreateExcelPackage(\"{{Entity_Name_Plural_Here}}List.xlsx\", items);	
            "
        },	
		{
			"placeholder": "{{ExportToFile_Method_Content_Here}}",
			"condition": "{{Project_Version_Here}} > 120001",
			"content": "
				var items = new List<Dictionary<string, object>>();

				foreach (var {{entity_Name_Here}} in {{entity_Name_Plural_Here}})
				{
					items.Add(new Dictionary<string, object>()
					{
						{{Property_Header_And_Value_Here}}{{NP_Header_And_Value_Here}}
						
					});
				}

				return CreateExcelPackage(\"{{Entity_Name_Plural_Here}}List.xlsx\", items);	
			"
		},						
		{
			"placeholder": "{{Sheet_Initialization_Here}}",
			"condition": "{{Project_Version_Here}} < 080400",
			"content": "var sheet = excelPackage.Workbook.Worksheets.Add(L(\"{{Entity_Name_Plural_Here}}\"));
                    sheet.OutLineApplyStyle = true;"
		},
		{
			"placeholder": "{{Sheet_Initialization_Here}}",
			"condition": "{{Project_Version_Here}} >= 080400",
			"content": "var sheet = excelPackage.CreateSheet(L(\"{{Entity_Name_Plural_Here}}\"));"
		},
		{
			"placeholder": "{{Add_Objects_Start_Index_Here}}",
			"condition": "{{Project_Version_Here}} >= 100400",
			"content": ""
		},
		{
			"placeholder": "{{Add_Objects_Start_Index_Here}}",
			"condition": "{{Project_Version_Here}} < 100400",
			"content": "2,"
		}
	]
}