#pragma once

#include <curses.h>

#include "collections/map.h"
#include "tui/tui.h"

struct pipemixer_config {
    float volume_step;
    float volume_min, volume_max;

    bool wraparound;
    bool display_ids;

    wchar_t bar_full_char[2], bar_empty_char[2];
    struct {
        wchar_t tl[2], tr[2], bl[2], br[2], cl[2], cr[2], ml[2], mr[2], f[2];
    } volume_frame;
    struct {
        /* see curs_border(3x) */
        wchar_t ls[2], rs[2], ts[2], bs[2], tl[2], tr[2], bl[2], br[2];
    } borders;
    wchar_t *routes_separator;
    wchar_t *profiles_separator;

    unsigned tabs_count;
    enum tui_tab_type tabs[TUI_TAB_TYPE_COUNT];
    enum tui_tab_type default_tab;

    struct map binds;
};

extern struct pipemixer_config config;

/* returns false if any errors were encountered */
bool load_config(const char *config_path);

