{{- $email := "" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- else -}}
{{- $email = promptStringOnce . "email" "email address" -}}
{{ end }}

{{- $gitUser := "" -}}
{{- if hasKey . "gitUser" -}}
{{- $gitUser = .gitUser -}}
{{- else -}}
{{- $gitUser = promptStringOnce . "gitUser" "git username" -}}
{{- end -}}

{{- $jsLinter := promptStringOnce . "jsLinter" "js linter" "standard" -}}
{{- if eq $jsLinter "" -}}
{{- $jsLinter = "standard" -}}
{{- end -}}

{{- $jsFixer := promptStringOnce . "jsFixer" "js fixer" "standard" -}}
{{- if eq $jsFixer "" -}}
{{- $jsFixer = "standard" -}}
{{- end -}}

{{- $installGo := promptBoolOnce . "installGo" "install golang bin" true -}}
{{- $installNode := promptBoolOnce . "installNode" "install nodejs bin" true -}}
{{- $installRust := promptBoolOnce . "installRust" "install rust bin" true -}}
{{- $enableTmux := promptBoolOnce . "enableTmux" "install enable tmux autostart" true -}}
{{- $enableSSHAgent := promptBoolOnce . "enableSSHAgent" "install enable ssh agent autostart" true -}}
{{- $enableUI := promptBoolOnce . "enableUI" "install enable ui" true -}}
{{- $systemd := promptBoolOnce . "systemd" "is systemd init" true -}}

[data.settings]
  systemd = {{ $systemd }}

[data.ui]
  enable = {{ $enableUI }}

[data.shell]
  tmux = {{ $enableTmux }}
  ssh_agent = {{ $enableSSHAgent }}

[data.gitconfig]
  email = {{ $email | quote }}
  username = {{ $gitUser | quote }}

[data.nvim]
  js_linter = {{ $jsLinter | quote }}
  js_fixer = {{ $jsFixer | quote }}

[data.dev]
  golang = {{ $installGo }}
  nodejs = {{ $installNode }}
  rust = {{ $installRust }}

[merge]
  command = "nvim"
  args = ["-d", "{{ "{{" }} .Destination {{ "}}" }}", "{{ "{{" }} .Source {{ "}}" }}", "{{ "{{" }} .Target {{ "}}" }}"]
