{
    "version": 1,
    "supportedProjectTypes": [ "PythonProject" ],
    "id": "E.QtQuickQtForPythonApplicationEmpty",
    "category": "F.ApplicationPySide",
    "trDescription": "Creates a Qt Quick application that contains an empty window.",
    "trDisplayName": "Qt Quick Application - Empty",
    "trDisplayCategory": "Application (Qt for Python)",
    "icon": "../icons/icon.png",
    "iconKind": "Themed",
    "enabled": "%{JS: isPluginRunning('python') && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",

    "options":
    [
        { "key": "SrcFileName", "value": "main.py" },
        { "key": "QmlFileName", "value": "Main.qml" },
        { "key": "PyProjectTomlFile", "value": "pyproject.toml" },
        { "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
        { "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
        { "key": "PySideVersion", "value": "%{JS: value('QtVersion').PySideVersion}" },
        { "key": "ProjectFilePath", "value": "%{ProjectDirectory}/%{PyProjectTomlFile}" }
    ],

    "pages":
    [
        {
            "trDisplayName": "Project Location",
            "trShortTitle": "Location",
            "typeId": "Project",
            "data": {
                "projectNameValidator": "^[A-Za-z0-9_]+$",
                "trProjectNameValidatorUserMessage": "Project name must use only letters, digits, or underscores."
            }
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "PythonConfiguration",
            "data":
            {
                "index": 0,
                "items":
                [
                    {
                        "trKey": "PySide 6",
                        "value":
                        {
                            "QtQuickVersion": "",
                            "QtQuickWindowVersion": "",
                            "PySideVersion": "PySide6"
                        }
                    }
                ]
            }
        },
        {
            "trDisplayName": "Kit Selection",
            "trShortTitle": "Kits",
            "typeId": "Kits",
            "data": {
                 "projectFilePath": "%{ProjectFilePath}",
                 "requiredFeatures": [ "Python.Interpreter" ]
            }
        },
        {
            "trDisplayName": "Project Management",
            "trShortTitle": "Summary",
            "typeId": "Summary"
        }
    ],
    "generators":
    [
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "../main_qtquick.py",
                    "target": "%{SrcFileName}"
                },
                {
                    "source": "pyproject.toml",
                    "target": "%{PyProjectTomlFile}",
                    "openAsProject": true
                },
                {
                    "source": "main.qml.tpl",
                    "target": "%{ProjectName}/%{QmlFileName}",
                    "openInEditor": true
                },
                {
                    "source": "qmldir.tpl",
                    "target": "%{ProjectName}/qmldir"
                },
                {
                    "source": "../requirements.txt",
                    "target": "requirements.txt"
                },
                {
                    "source": "../../git.ignore",
                    "target": ".gitignore",
                    "condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
                }
            ]
        }
    ]
}
