import QtQuick
import QtQuick.Controls.Basic

Item {
    id: root

    property real padding: 10

    // Automatically size based on content plus padding
    implicitWidth: contentItem.childrenRect.width + padding * 2
    implicitHeight: contentItem.childrenRect.height + padding * 2

    // Background
    Rectangle {
        anchors.fill: parent
        color: Theme.card
        radius: Theme.radius
        border.color: Theme.softBorder
        border.width: 1
    }

    // This allows direct assignment of children to AppCard
    default property alias content: contentItem.children
    // Content container
    Item {
        id: contentItem
        anchors.fill: parent
        anchors.margins: padding
    }
}
