if not AiB_Content then AiB_Content = {} end

AiB_Content["Raid Allgemein"] = function(frame)
    local container = CreateFrame("Frame", nil, frame)
    container:SetAllPoints()

    -- Haupttext: Titel (zentriert, bleibt unverändert)
    local text = container:CreateFontString(nil, "OVERLAY")
    text:SetFont("Fonts\\ARIALN.TTF", 14, "OUTLINE")
    text:SetText("Willkommen im Raid Allgemein-Tab!\nHier ist dein Inhalt!")
    text:SetTextColor(1, 1, 1, 1)
    text:SetPoint("TOP", container, "TOP", 0, -20)

    -- Verschiebungswerte
    local offsetX = 50  -- 50px nach rechts
    local offsetY = 30  -- 30px weiter unten

    -- Überschrift "Heroic Weakauren" in größerer Schrift, verschoben
    local header = container:CreateFontString(nil, "OVERLAY")
    header:SetFont("Fonts\\ARIALN.TTF", 16, "OUTLINE")
    header:SetText("Heroic Weakauren")
    header:SetTextColor(1, 1, 1, 1)
    header:SetPoint("TOPLEFT", container, "TOPLEFT", 30 + offsetX, -60 - offsetY)

    -- Absatz unter der Überschrift
    local paragraph = container:CreateFontString(nil, "OVERLAY")
    paragraph:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    paragraph:SetText("Wähle eine WeakAura aus:")
    paragraph:SetTextColor(1, 1, 1, 1)
    paragraph:SetPoint("TOPLEFT", header, "BOTTOMLEFT", 0, -5)

    -- Feste Breite 
    local fixedWidth = 320

    ---------------------------
    -- Heroic Buttons
    ---------------------------
    -- Erster Heroic Button: Liberation of Undermine by Northern Sky
    local importButton = CreateFrame("Button", nil, container)
    importButton:SetPoint("TOPLEFT", paragraph, "BOTTOMLEFT", 0, -10)
    importButton:SetSize(fixedWidth, 40)
    
    local buttonLogo = importButton:CreateTexture(nil, "ARTWORK")
    buttonLogo:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    buttonLogo:SetSize(30, 30)
    buttonLogo:SetPoint("LEFT", importButton, "LEFT", 5, 0)
    
    local buttonText = importButton:CreateFontString(nil, "OVERLAY")
    buttonText:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    buttonText:SetText("Liberation of Undermine by Northern Sky")
    buttonText:SetTextColor(1, 1, 1, 1)
    buttonText:SetPoint("LEFT", buttonLogo, "RIGHT", 5, 0)
    importButton.text = buttonText

    local buttonBg = importButton:CreateTexture(nil, "BACKGROUND")
    buttonBg:SetAllPoints()
    buttonBg:SetColorTexture(0.1, 0.1, 0.1, 1)
    importButton.bg = buttonBg

    importButton:SetScript("OnEnter", function()
        buttonBg:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    importButton:SetScript("OnLeave", function()
        buttonBg:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    importButton:SetScript("OnClick", function()
        if WEAKAURA_undermine_hc_ns and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_undermine_hc_ns)
            if not true then
                print("|cFFFF0000Fehler beim Import:|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Liberation of Undermine by Northern Sky erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein WeakAura-String gefunden!|r")
        end
    end)

    -- Zweiter Heroic Button: Liberation of Undermine by Causese
    local importButton2 = CreateFrame("Button", nil, container)
    importButton2:SetPoint("TOPLEFT", importButton, "BOTTOMLEFT", 0, -10)
    importButton2:SetSize(fixedWidth, 40)
    
    local buttonLogo2 = importButton2:CreateTexture(nil, "ARTWORK")
    buttonLogo2:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    buttonLogo2:SetSize(30, 30)
    buttonLogo2:SetPoint("LEFT", importButton2, "LEFT", 5, 0)
    
    local buttonText2 = importButton2:CreateFontString(nil, "OVERLAY")
    buttonText2:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    buttonText2:SetText("Liberation of Undermine by Causese")
    buttonText2:SetTextColor(1, 1, 1, 1)
    buttonText2:SetPoint("LEFT", buttonLogo2, "RIGHT", 5, 0)
    importButton2.text = buttonText2

    local buttonBg2 = importButton2:CreateTexture(nil, "BACKGROUND")
    buttonBg2:SetAllPoints()
    buttonBg2:SetColorTexture(0.1, 0.1, 0.1, 1)
    importButton2.bg = buttonBg2

    importButton2:SetScript("OnEnter", function()
        buttonBg2:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    importButton2:SetScript("OnLeave", function()
        buttonBg2:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    importButton2:SetScript("OnClick", function()
        if WEAKAURA_undermine_causese and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_undermine_causese)
            if not true then
                print("|cFFFF0000Fehler beim Import:|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Liberation of Undermine by Causese erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein WeakAura-String gefunden!|r")
        end
    end)

    ---------------------------
    -- Neuer Abschnitt: Mythic Weakauren
    ---------------------------
    local mythicHeader = container:CreateFontString(nil, "OVERLAY")
    mythicHeader:SetFont("Fonts\\ARIALN.TTF", 16, "OUTLINE")
    mythicHeader:SetText("Mythic Weakauren")
    mythicHeader:SetTextColor(1, 1, 1, 1)
    mythicHeader:SetPoint("TOPLEFT", importButton2, "BOTTOMLEFT", 0, -20)

    local mythicSubHeader = container:CreateFontString(nil, "OVERLAY")
    mythicSubHeader:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicSubHeader:SetText("Diese WeakAurend sind Pflicht!")
    mythicSubHeader:SetTextColor(1, 1, 1, 1)
    mythicSubHeader:SetPoint("TOPLEFT", mythicHeader, "BOTTOMLEFT", 0, -5)

    -- Mythic Button 1
    local mythicButton1 = CreateFrame("Button", nil, container)
    mythicButton1:SetPoint("TOPLEFT", mythicSubHeader, "BOTTOMLEFT", 0, -10)
    mythicButton1:SetSize(fixedWidth, 40)
    
    local mythicLogo1 = mythicButton1:CreateTexture(nil, "ARTWORK")
    mythicLogo1:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    mythicLogo1:SetSize(30, 30)
    mythicLogo1:SetPoint("LEFT", mythicButton1, "LEFT", 5, 0)
    
    local mythicText1 = mythicButton1:CreateFontString(nil, "OVERLAY")
    mythicText1:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicText1:SetText("Liberation of Undermine M by Northern Sky")
    mythicText1:SetTextColor(1, 1, 1, 1)
    mythicText1:SetPoint("LEFT", mythicLogo1, "RIGHT", 5, 0)
    mythicButton1.text = mythicText1

    local mythicBg1 = mythicButton1:CreateTexture(nil, "BACKGROUND")
    mythicBg1:SetAllPoints()
    mythicBg1:SetColorTexture(0.1, 0.1, 0.1, 1)
    mythicButton1.bg = mythicBg1

    mythicButton1:SetScript("OnEnter", function()
        mythicBg1:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    mythicButton1:SetScript("OnLeave", function()
        mythicBg1:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    mythicButton1:SetScript("OnClick", function()
        if WEAKAURA_undermine_m_ns and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_undermine_m_ns)
            if not true then
                print("|cFFFF0000Fehler beim Import (Liberation of Undermine M by Northern Sky):|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Liberation of Undermine M by Northern Sky erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein Liberation of Undermine M by Northern Sky String gefunden!|r")
        end
    end)

    -- Mythic Button 2
    local mythicButton2 = CreateFrame("Button", nil, container)
    mythicButton2:SetPoint("TOPLEFT", mythicButton1, "BOTTOMLEFT", 0, -10)
    mythicButton2:SetSize(fixedWidth, 40)
    
    local mythicLogo2 = mythicButton2:CreateTexture(nil, "ARTWORK")
    mythicLogo2:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    mythicLogo2:SetSize(30, 30)
    mythicLogo2:SetPoint("LEFT", mythicButton2, "LEFT", 5, 0)
    
    local mythicText2 = mythicButton2:CreateFontString(nil, "OVERLAY")
    mythicText2:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicText2:SetText("Database & Functions by Northern Sky")
    mythicText2:SetTextColor(1, 1, 1, 1)
    mythicText2:SetPoint("LEFT", mythicLogo2, "RIGHT", 5, 0)
    mythicButton2.text = mythicText2

    local mythicBg2 = mythicButton2:CreateTexture(nil, "BACKGROUND")
    mythicBg2:SetAllPoints()
    mythicBg2:SetColorTexture(0.1, 0.1, 0.1, 1)
    mythicButton2.bg = mythicBg2

    mythicButton2:SetScript("OnEnter", function()
        mythicBg2:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    mythicButton2:SetScript("OnLeave", function()
        mythicBg2:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    mythicButton2:SetScript("OnClick", function()
        if WEAKAURA_data_ns and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_data_ns)
            if not true then
                print("|cFFFF0000Fehler beim Import (Database & Functions by Northern Sky):|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Database & Functions by Northern Sky erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein Database & Functions by Northern Sky String gefunden!|r")
        end
    end)

    -- Mythic Button 3
    local mythicButton3 = CreateFrame("Button", nil, container)
    mythicButton3:SetPoint("TOPLEFT", mythicButton2, "BOTTOMLEFT", 0, -10)
    mythicButton3:SetSize(fixedWidth, 40)
    
    local mythicLogo3 = mythicButton3:CreateTexture(nil, "ARTWORK")
    mythicLogo3:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    mythicLogo3:SetSize(30, 30)
    mythicLogo3:SetPoint("LEFT", mythicButton3, "LEFT", 5, 0)
    
    local mythicText3 = mythicButton3:CreateFontString(nil, "OVERLAY")
    mythicText3:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicText3:SetText("WeakAura Anchors by Northern Sky")
    mythicText3:SetTextColor(1, 1, 1, 1)
    mythicText3:SetPoint("LEFT", mythicLogo3, "RIGHT", 5, 0)
    mythicButton3.text = mythicText3

    local mythicBg3 = mythicButton3:CreateTexture(nil, "BACKGROUND")
    mythicBg3:SetAllPoints()
    mythicBg3:SetColorTexture(0.1, 0.1, 0.1, 1)
    mythicButton3.bg = mythicBg3

    mythicButton3:SetScript("OnEnter", function()
        mythicBg3:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    mythicButton3:SetScript("OnLeave", function()
        mythicBg3:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    mythicButton3:SetScript("OnClick", function()
        if WEAKAURA_anchors_ns and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_anchors_ns)
            if not true then
                print("|cFFFF0000Fehler beim Import (Anchors by Northern Sky):|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Anchors by Northern Sky erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein Anchors by Northern Sky String gefunden!|r")
        end
    end)

    -- Mythic Button 4
    local mythicButton4 = CreateFrame("Button", nil, container)
    mythicButton4:SetPoint("TOPLEFT", mythicButton3, "BOTTOMLEFT", 0, -10)
    mythicButton4:SetSize(fixedWidth, 40)
    
    local mythicLogo4 = mythicButton4:CreateTexture(nil, "ARTWORK")
    mythicLogo4:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    mythicLogo4:SetSize(30, 30)
    mythicLogo4:SetPoint("LEFT", mythicButton4, "LEFT", 5, 0)
    
    local mythicText4 = mythicButton4:CreateFontString(nil, "OVERLAY")
    mythicText4:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicText4:SetText("Interrupt Anchor by Northern Sky")
    mythicText4:SetTextColor(1, 1, 1, 1)
    mythicText4:SetPoint("LEFT", mythicLogo4, "RIGHT", 5, 0)
    mythicButton4.text = mythicText4

    local mythicBg4 = mythicButton4:CreateTexture(nil, "BACKGROUND")
    mythicBg4:SetAllPoints()
    mythicBg4:SetColorTexture(0.1, 0.1, 0.1, 1)
    mythicButton4.bg = mythicBg4

    mythicButton4:SetScript("OnEnter", function()
        mythicBg4:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    mythicButton4:SetScript("OnLeave", function()
        mythicBg4:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    mythicButton4:SetScript("OnClick", function()
        if WEAKAURA_interrupt_anchor and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_interrupt_anchor)
            if not true then
                print("|cFFFF0000Fehler beim Import (Interrupt Anchor by Northern Sky):|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Interrupt Anchor by Northern Sky erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein Interrupt Anchor by Northern Sky String gefunden!|r")
        end
    end)

    -- Mythic Button 5
    local mythicButton5 = CreateFrame("Button", nil, container)
    mythicButton5:SetPoint("TOPLEFT", mythicButton4, "BOTTOMLEFT", 0, -10)
    mythicButton5:SetSize(fixedWidth, 40)
    
    local mythicLogo5 = mythicButton5:CreateTexture(nil, "ARTWORK")
    mythicLogo5:SetTexture("Interface\\AddOns\\AiB\\textures\\wa_logo.tga")
    mythicLogo5:SetSize(30, 30)
    mythicLogo5:SetPoint("LEFT", mythicButton5, "LEFT", 5, 0)
    
    local mythicText5 = mythicButton5:CreateFontString(nil, "OVERLAY")
    mythicText5:SetFont("Fonts\\ARIALN.TTF", 12, "OUTLINE")
    mythicText5:SetText("Octopals Verifier by HenryG")
    mythicText5:SetTextColor(1, 1, 1, 1)
    mythicText5:SetPoint("LEFT", mythicLogo5, "RIGHT", 5, 0)
    mythicButton5.text = mythicText5

    local mythicBg5 = mythicButton5:CreateTexture(nil, "BACKGROUND")
    mythicBg5:SetAllPoints()
    mythicBg5:SetColorTexture(0.1, 0.1, 0.1, 1)
    mythicButton5.bg = mythicBg5

    mythicButton5:SetScript("OnEnter", function()
        mythicBg5:SetColorTexture(0.3, 0.3, 0.3, 1)
    end)
    mythicButton5:SetScript("OnLeave", function()
        mythicBg5:SetColorTexture(0.1, 0.1, 0.1, 1)
    end)

    mythicButton5:SetScript("OnClick", function()
        if WEAKAURA_octopals_verifier and WeakAuras then
            local success, errorMessage = WeakAuras.Import(WEAKAURA_octopals_verifier)
            if not true then
                print("|cFFFF0000Fehler beim Import (Octopals Verifier by HenryG):|r " .. (errorMessage or "Unbekannter Fehler"))
            else
                print("|cFF00FF00Octopals Verifier by HenryG erfolgreich importiert!|r")
            end
        else
            print("|cFFFF0000Fehler: Kein Octopals Verifier by HenryG String gefunden!|r")
        end
    end)
end
