-- Pull in the wezterm API

local wezterm = require("wezterm")

-- require plugin

local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")

-- initialize module variable

local module = {}

-- initialize setup function

function module.apply_to_config(config)
	tabline.setup({
		options = {
			theme = "Catppuccin Macchiato",
			section_separators = {
				left = wezterm.nerdfonts.ple_right_half_circle_thick,
				right = wezterm.nerdfonts.ple_left_half_circle_thick,
			},
			component_separators = {
				left = wezterm.nerdfonts.ple_left_half_circle_thin,
				right = wezterm.nerdfonts.ple_left_half_circle_thin,
			},
			tab_separators = {
				left = wezterm.nerdfonts.ple_right_half_circle_thick,
				right = wezterm.nerdfonts.ple_left_half_circle_thick,
			},
		},
		sections = {
			tab_active = {
				"index",
				":",
				"tab",
			},
			tab_inactive = {
				"index",
				":",
				"tab",
			},
			tabline_x = {},
			tabline_y = {},
			tabline_z = { "datetime" },
		},
	})
end

return module
