local M = {}

M.dev_plugins = {
{% if dev_plugins is defined and dev_plugins | length > 0 %}
{% for item in dev_plugins %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.dap_enabled = {{ dap_enabled | string |lower }}
M.lsp_enabled = {{ lsp_enabled | string |lower }}
M.lsp_features = {
	virtual_text = {{ lsp_features.virtual_text | string |lower }},
	inlay_hints = {{ lsp_features.inlay_hints | string |lower }},
}
M.edit_features = {
	completion = {{ edit_features.completion | string |lower }},
}

M.ui_features = {
	animate = {{ ui_features.animate | string | lower}},
	indent_lines = {{ ui_features.indent_lines | string |lower }},
	tabline = {{ ui_features.tabline | string |lower }},
}

M.syntax_features = {
	typst = {{ syntax_features.typst | string |lower }},
	quarto = {{ syntax_features.quarto | string |lower }},
	tex = {{ syntax_features.tex | string |lower }},
	markdown = {{ syntax_features.markdown | string |lower }},
}

M.frecency_workspaces = {
{% if frecency_workspaces is defined and frecency_workspaces | length > 0 %}
{% for item in frecency_workspaces %}
{% for key, value in item.items() %}
	["{{ key }}"] = vim.fn.expand("{{ value }}"),
{% endfor %}
{% endfor %}
{% endif %}
}

M.treesitter_sources = {
{% if treesitter_sources is defined and treesitter_sources | length > 0 %}
{% for item in treesitter_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.dap_signs = {
{% if dap_signs is defined and dap_signs | length > 0 %}
{% for item in dap_signs %}
{% for key, value in item.items() %}
      {{ key }} = "{{ value }}",
{% endfor %}
{% endfor %}
{% endif %}
}

M.lsp_signs = {
{% if lsp_signs is defined and lsp_signs | length > 0 %}
{% for item in lsp_signs %}
{% for key, value in item.items() %}
      {{ key }} = "{{ value }}",
{% endfor %}
{% endfor %}
{% endif %}
}

M.lsp_vt_signs = {
	[1] = "ERROR", -- ERROR
	[2] = "WARN", -- WARN
	[3] = "INFO", -- INFO
	[4] = "HINT", -- HINT
}

M.lsp_kind_icons = {
{% if lsp_kind_icons is defined and lsp_kind_icons | length > 0 %}
{% for item in lsp_kind_icons %}
{% for key, value in item.items() %}
      {{ key }} = "{{ value }}",
{% endfor %}
{% endfor %}
{% endif %}
}

M.lsp_sources = {
{% if lsp_sources is defined and lsp_sources | length > 0 %}
{% for item in lsp_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.null_formatting_sources = {
{% if null_formatting_sources is defined and null_formatting_sources | length > 0 %}
{% for item in null_formatting_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.null_hover_sources = {
{% if null_hover_sources is defined and null_hover_sources | length > 0 %}
{% for item in null_hover_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.null_diagnostics_sources = {
{% if null_diagnostics_sources is defined and null_diagnostics_sources | length > 0 %}
{% for item in null_diagnostics_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.null_code_action_sources = {
{% if null_code_actions_sources is defined and null_code_actions_sources | length > 0 %}
{% for item in null_code_actions_sources %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.starter_ascii = "{{ starter_ascii }}"

M.org_agenda_files = {
{% if org_agenda_files is defined and org_agenda_files | length > 0 %}
{% for item in org_agenda_files %}
	"{{ item }}",
{% endfor %}
{% endif %}
}

M.zk_wiki = "{{ zk_wiki }}"

M.border = "single"

return M
