---
- name: "Ensure {{ app_name }} is installed"
  chocolatey.chocolatey.win_chocolatey:
    name: autohotkey
    state: "{{ app_state | default('present') }}"

- name: Ensure AutoHotKey scripts are copied
  ansible.windows.win_copy:
    src: "{{ item }}"
    dest: '%PROGRAMFILES%\AutoHotKey\'
  loop:
    - EmptyRecycleBin.ahk
    - SuspendAHK.ahk
    - ToggleHiddenFiles.ahk
    - WindowAlwaysOnTop.ahk
  when: install_scripts | bool
