require("tokyonight").setup({
	style = "storm",
	transparent = true,
	terminal_colors = true,
	styles = {
		sidebars = "transparent",
		floats = "transparent",
	},
})

vim.cmd.colorscheme("tokyonight")
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })

local colors = {
	blue = "#7aa2f7",
	black = "#15161e",
	red = "#f7768e",
	violet = "#bb9af7",
	yellow = "#e0af68",
	green = "#9ece6a",
	bg = nil,
	fg = "#c0caf5",
}

local lualine_theme = {
	normal = {
		a = { bg = colors.blue, fg = colors.black, gui = "bold" },
		b = { bg = colors.bg, fg = colors.blue },
		c = { bg = colors.bg, fg = colors.fg },
	},
	insert = {
		a = { bg = colors.green, fg = colors.black, gui = "bold" },
		b = { bg = colors.bg, fg = colors.green },
		c = { bg = colors.bg, fg = colors.fg },
	},
	visual = {
		a = { bg = colors.violet, fg = colors.black, gui = "bold" },
		b = { bg = colors.bg, fg = colors.violet },
		c = { bg = colors.bg, fg = colors.fg },
	},
	command = {
		a = { bg = colors.yellow, fg = colors.black, gui = "bold" },
		b = { bg = colors.bg, fg = colors.yellow },
		c = { bg = colors.bg, fg = colors.fg },
	},
	replace = {
		a = { bg = colors.red, fg = colors.black, gui = "bold" },
		b = { bg = colors.bg, fg = colors.red },
		c = { bg = colors.bg, fg = colors.fg },
	},
	inactive = {
		a = { bg = colors.bg, fg = colors.blue, gui = "bold" },
		b = { bg = colors.bg, fg = colors.fg },
		c = { bg = colors.bg, fg = colors.fg },
	},
}

require("lualine").setup({
	options = {
		theme = lualine_theme,
		globalstatus = true,
		component_separators = "",
		section_separators = { left = "", right = "" },
	},
	sections = {
		lualine_a = { { "mode", separator = { right = "" } } },
		lualine_b = { "filename" },
		lualine_c = { "branch", "diff" },
		lualine_x = {
			{
				"diagnostics",
				sources = { "nvim_diagnostic" },
				symbols = { error = " ", warn = " ", info = " ", hint = " " },
			},
			{ "encoding" },
			{ "fileformat" },
			{ "filetype" },
		},
		lualine_y = { "progress" },
		lualine_z = { "location" },
	},
})
