#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
    address: "127.0.0.1:6600",
    password: None,
    theme: Some("neralie"),
    cache_dir: None,
    on_song_change: None,
    volume_step: 5,
    scrolloff: 0,
    wrap_navigation: false,
    enable_mouse: true,
    status_update_interval_ms: 1000,
    select_current_song_on_change: false,
    album_art: (
        method: Auto,
        max_size_px: (width: 600, height: 600),
        disabled_protocols: ["http://", "https://"],
    ),
    keybinds: (
        global: {
            ":": CommandMode,
            ",": VolumeDown,
            ".": VolumeUp,
            "p": TogglePause,
            "s": Stop,
            "q": Quit,
            "<C-A-Right>": NextTab,
            "<C-A-Left>": PreviousTab,
            ">": NextTrack,
            "<": PreviousTrack,
            "<S-Right>": SeekForward,
            "<S-Left>": SeekBack,
            "z": ToggleRepeat,
            "x": ToggleRandom,
            "c": ToggleConsume,
            "v": ToggleSingle,
            "`": ShowHelp,
            "?": ShowCurrentSongInfo,
            "O": ShowOutputs,
            "P": ShowDecoders,
            "1": SwitchToTab("main"),
            "2": SwitchToTab("directories"),
            "3": SwitchToTab("artists"),
            "4": SwitchToTab("albums"),
            "5": SwitchToTab("playlists"),
            "6": SwitchToTab("search"),
        },
        navigation: {
            "k":         Up,
            "j":         Down,
            "h":         Left,
            "l":         Right,
            "<Up>":      Up,
            "<Down>":    Down,
            "<Left>":    Left,
            "<Right>":   Right,
            "<C-k>":     PaneUp,
            "<C-j>":     PaneDown,
            "<C-h>":     PaneLeft,
            "<C-l>":     PaneRight,
            "<C-u>":     UpHalf,
            "<C-d>":     DownHalf,
            "N":         PreviousResult,
            "n":         NextResult,
            "<CR>":      Add,
            "A":         AddAll,
            "<Del>":     Delete,
            "r":         Rename,
            "<Home>":    Top,
            "<End>":     Bottom,
            "<Space>":   Select,
            "<C-Space>": InvertSelection,
            "<CR>":      Confirm,
            "i":         FocusInput,
            "/":         EnterSearch,
            "<C-c>":     Close,
            "<Esc>":     Close,
            "K":         MoveUp,
            "J":         MoveDown,
        },
        queue: {
            "D":       DeleteAll,
            "<CR>":    Play,
            "<C-s>":   Save,
            "a":       AddToPlaylist,
            "d":       Delete,
            "i":       ShowInfo,
            "C":       JumpToCurrent,
        },
    ),
    search: (
        case_sensitive: false,
        mode: Contains,
        tags: [
            (value: "any",         label: "Any Tag"),
            (value: "artist",      label: "Artist"),
            (value: "album",       label: "Album"),
            (value: "albumartist", label: "Album Artist"),
            (value: "title",       label: "Title"),
            (value: "filename",    label: "Filename"),
            (value: "genre",       label: "Genre"),
        ],
    ),
    artists: (
        album_display_mode: SplitByDate,
        album_sort_by: Date,
    ),
    tabs: [
        (
            name: "main",
            border_type: None,
            pane: Split(
                direction: Horizontal,
                panes: [
                    (size: "20%", pane: Split(
                        direction: Vertical,
                        panes: [
                            (size: "40%", pane: Pane(AlbumArt)),    
                            (size: "60%", pane: Pane(AlbumArtists))
                        ]
                    )),
                    (size: "80%", pane: Pane(Queue))
                ],
            ),
        ),
        (
            name: "directories",
            border_type: None,
            pane: Pane(Directories),
        ),
        (
            name: "artists",
            border_type: None,
            pane: Pane(AlbumArtists),
        ),
        (
            name: "albums",
            border_type: None,
            pane: Pane(Albums),
        ),
        (
            name: "playlists",
            border_type: None,
            pane: Pane(Playlists),
        ),
        (
            name: "search",
            border_type: None,
            pane: Pane(Search),
        ),
    ],
)