local M = {}

---@param conf VagueColorscheme.InternalConfig
---@return table
M.get_colors = function(conf)
  local c = conf.colors

  -- stylua: ignore
  local hl = {
    ColorColumn      = { bg = c.line },
    Conceal          = { fg = c.func, bg = c.bg },
    CurSearch        = { fg = c.fg, bg = c.search or c.visual },
    Cursor           = { gui = "reverse" },
    vCursor          = { gui = "reverse" },
    iCursor          = { gui = "reverse" },
    lCursor          = { gui = "reverse" },
    CursorIM         = { gui = "reverse" },
    CursorColumn     = { bg = c.line },
    CursorLine       = { bg = c.line },
    CursorLineNr     = { fg = c.fg },
    Debug            = { fg = c.constant },
    debugPC          = { fg = c.bg, bg = c.fg },
    debugBreakpoint  = { fg = c.bg, bg = c.operator },
    Directory        = { fg = c.hint },
    OkMsg            = { fg = c.plus },
    ErrorMsg         = { fg = c.error, gui = "bold" },
    EndOfBuffer      = { fg = c.comment or c.bg },
    FloatBorder      = { fg = c.floatBorder, bg = conf.transparent and "none" or c.bg },
    FloatTitle       = { fg = c.floatBorder, bg = conf.transparent and "none" or c.bg },
    FloatFooter      = { fg = c.floatBorder, bg = conf.transparent and "none" or c.bg },
    Folded           = { fg = c.comment, bg = conf.transparent and "none" or c.line },
    FoldColumn       = { fg = c.comment, bg = conf.transparent and "none" or c.bg },
    IncSearch        = { fg = c.bg, bg = c.search or c.visual },
    LineNr           = { fg = c.comment },
    MatchParen       = { fg = c.fg, bg = c.visual },
    MoreMsg          = { fg = c.func, gui = "bold" },
    MsgSeparator     = { fg = c.string, bg = c.line, gui = "bold" },
    NonText          = { fg = c.comment },
    Normal           = { fg = c.fg, bg = conf.transparent and "none" or c.bg },
    NormalFloat      = { fg = c.fg, bg = conf.transparent and "none" or c.bg },
    ModeMsg          = { fg = c.string },
    Pmenu            = { fg = c.fg, bg = c.bg },
    PmenuSel         = { fg = c.constant, bg = c.line },
    PmenuSbar        = { bg = c.bg },
    PmenuThumb       = { bg = c.comment },
    PmenuBorder      = { fg = c.floatBorder },
    Question         = { fg = c.constant },
    QuickFixLine     = { fg = c.func, gui = "underline" },
    Search           = { fg = c.fg, bg = c.search or c.visual },
    SignColumn       = { fg = c.fg, bg = conf.transparent and "none" or c.bg },
    SpecialKey       = { fg = c.comment },
    SpellBad         = { fg = "none", gui = "undercurl" },
    SpellCap         = { fg = "none", gui = "undercurl" },
    SpellLocal       = { fg = "none", gui = "undercurl" },
    SpellRare        = { fg = "none", gui = "undercurl" },
    StatusLine       = { fg = c.fg, bg = c.inactiveBg },
    StatusLineTerm   = { fg = c.fg, bg = c.inactiveBg },
    StatusLineNC     = { fg = c.comment, bg = c.bg },
    StatusLineTermNC = { fg = c.comment, bg = c.bg },
    Substitute       = { fg = c.type, bg = c.visual },
    TabLine          = { fg = c.fg, bg = c.line },
    TabLineFill      = { fg = c.comment, bg = c.line },
    TabLineSel       = { fg = c.bg, bg = c.fg },
    Terminal         = { fg = c.fg, bg = conf.transparent and "none" or c.bg },
    ToolbarButton    = { fg = c.bg, bg = c.visual },
    ToolbarLine      = { fg = c.fg },
    Visual           = { fg = c.fg, bg = c.visual },
    VisualNOS        = { fg = "none", bg = c.comment, gui = "underline" },
    WarningMsg       = { fg = c.warning, gui = "bold" },
    Whitespace       = { fg = c.comment },
    WildMenu         = { fg = c.bg, bg = c.func },
    WinSeparator     = { fg = c.floatBorder },
  }

  return hl
end
return M
