--[[
============================================================
Decor Vendor Addon
© 2026 MidniteDestiny. All Rights Reserved.
============================================================

This file is part of the Decor Vendor addon.

All code, structure, and design are the intellectual
property of MidniteDestiny unless otherwise stated.

You may NOT:
• Copy, reproduce, or redistribute this code
• Modify and redistribute this code
• Use this code in other addons or projects

without explicit permission from the author.

This addon is distributed for personal use only.

============================================================
]]

local addonName, dv = ...

local C = dv.CONSTANTS

if not dv.itemContainer then
    print("|cffff4040DecorVendor NotesPanels:|r dv.itemContainer is missing. Make sure UI\\PreviewPanel.lua loads first.")
    return
end

if not dv.modelDivider then
    print("|cffff4040DecorVendor NotesPanels:|r dv.modelDivider is missing. Make sure UI\\PreviewPanel.lua loads first.")
    return
end

-- ============================================================
-- Vendor Notes Panel
-- ============================================================

if not dv.vendorNotes then
    dv.vendorNotes = CreateFrame("Frame", nil, dv.itemContainer)

    dv.vendorNotes:SetPoint("TOPLEFT", dv.modelDivider, "BOTTOMLEFT", 10, -260)
    dv.vendorNotes:SetPoint("TOPRIGHT", dv.modelDivider, "BOTTOMRIGHT", -10, -260)
    dv.vendorNotes:SetHeight(60)
    dv.vendorNotes:Hide()

    dv.vendorNotes.bg = dv.vendorNotes:CreateTexture(nil, "BACKGROUND")
    dv.vendorNotes.bg:SetAllPoints()
    dv.vendorNotes.bg:SetColorTexture(0.08, 0.08, 0.08, 0.75)

    dv.vendorNotes.text = dv.vendorNotes:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
    dv.vendorNotes.text:SetPoint("TOPLEFT", dv.vendorNotes, "TOPLEFT", 10, -10)
    dv.vendorNotes.text:SetPoint("TOPRIGHT", dv.vendorNotes, "TOPRIGHT", -10, -10)
    dv.vendorNotes.text:SetJustifyH("LEFT")
    dv.vendorNotes.text:SetJustifyV("TOP")
    dv.vendorNotes.text:SetWordWrap(true)
    dv.vendorNotes.text:SetNonSpaceWrap(false)
    dv.vendorNotes.text:SetFont(STANDARD_TEXT_FONT, 12, "")
    dv.vendorNotes.text:SetTextColor(1, 1, 1, 1)
end