local isInitialized = false;
function MuteBards:InitSettingsPanel(svZones)
  local panelData = {
    type = "panel",
    name = "MuteBards 2.0",
    displayName = "MuteBards 2.0",
    author = "MadDachshund",
    version = "2.0",
    slashCommand = "/mutebards", --(optional) will register a keybind to open to this panel
    registerForRefresh = true, --boolean (optional) (will refresh all options controls when a setting is changed and when the panel is shown)
    registerForDefaults = false, --boolean (optional) (will set all options controls back to default values)
  }
  local zoneToAdd, zoneToRemove
  local optionsTable = {
    [1] = {
      type = "header",
      name = "Zones",
      width = "full", --or "half" (optional)
    },
    [2] = {
      type = "description",
      --title = "My Title",	--(optional)
      text = "Add the exact subzone (usually town) name for the zone you wish to mute bards in.  For example, \"Solitude\" or \"Rimmen\" (without quotes)",
      width = "full", --or "half" (optional)
    },
    [3] = {
      type = "editbox",
      name = "Add Zone:",
      tooltip = "Zone Name",
      getFunc = function()
        return zoneToAdd
      end,
      setFunc = function(text)
        zoneToAdd = text
      end,
      isMultiline = false, --boolean
      width = "half", --or "half" (optional)
      default = "", --(optional)
    },
    [4] = {
      type = "button",
      name = "Add",
      func = function()
        MuteBards:AddZone(zoneToAdd, function() MuteBards:Refresh() end);
        zoneToAdd = "";
      end,
      width = "half", --or "half" (optional)
    },
    [5] = {
      type = "description",
      title = "Currently Muted Zones:",
      text = function()
        return table.concat(svZones, ", ");
      end,
      width = "full",
      requiresReload = true,
    },
    [6] = {
      type = "editbox",
      name = "Remove Zone:",
      getFunc = function()
        return zoneToRemove
      end,
      setFunc = function(text)
        zoneToRemove = text
      end,
      isMultiline = false, --boolean
      width = "half", --or "full" (optional)
      default = "", --(optional)
    },
    [7] = {
      type = "button",
      name = "Remove",
      func = function()
        MuteBards:RemoveZone(zoneToRemove, function() MuteBards:Refresh() end);
        zoneToRemove = "";
      end,
      width = "half", --or "full" (optional)
    },
    [8] = {
      type = "button",
      name = "Force Refresh",
      func = function() MuteBards:Refresh() end,
      width = "full", --or "half" (optional)
    },
  }

  local LAM = LibAddonMenu2 or LibStub("LibAddonMenu-2.0")
  if (not isInitialized) then
    LAM:RegisterAddonPanel("MuteBards2", panelData)
  end
  LAM:RegisterOptionControls("MuteBards2", optionsTable);

  isInitialized = true;

end