-- UI/Controls/Card.lua
--
-- A reusable control for creating a standardized bordered information panel,
-- which is the main building block of the Toolkit's UI pages.

local addonName, SinsToolkit = ...

-- Ensure the namespace exists.
SinsToolkit.UI = SinsToolkit.UI or {}
SinsToolkit.UI.Controls = SinsToolkit.UI.Controls or {}

local Card = {}
SinsToolkit.UI.Controls.Card = Card

function Card:Create(parent)
    local control = {}
    local Theme = SinsToolkit.UI.Theme

    -- Main container frame for the card.
    local frame = CreateFrame("Frame", nil, parent)
    Theme.ApplyCard(frame)

    --[[
        Public API for the new control instance.
    --]]

    --[[
        Returns the underlying Frame widget for positioning and parenting.
        @return The Card's main Frame.
    --]]
    function control:GetFrame()
        return frame
    end

    return control
end
