{
    "version": 1,
    "supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
    "id": "QA.QtQuickUi",
    "category": "H.Project",
    "trDescription": "Creates a Qt Quick UI project for previewing and prototyping designs.\n\nTo develop a full application, create a Qt Quick Application project instead.",
    "trDisplayName": "Qt Quick UI Prototype",
    "trDisplayCategory": "Other Project",
    "icon": "qtquickuiprototype.png",
    "iconKind": "Themed",
    "enabled": "%{JS: isPluginRunning('qmlprojectmanager')}",
    "featuresRequired": [ "QtSupport.Wizards.FeatureQtQuickProject", "QtSupport.Wizards.FeatureQtQuick.6" ],

    "options":
    [
        { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qmlproject')}" },
        { "key": "MainQmlFileName", "value": "%{JS: Util.fileName(value('ProjectName'), 'qml')}" },
        { "key": "UseVirtualKeyboardByDefault", "value": "%{JS: isPluginRunning('boot2qt')}" },
        { "key": "EnableCMakeGeneration", "value": "%{JS: false}" },
        { "key": "QdsWizardPath", "value": "%{IDE:ResourcePath}/qmldesigner/studio_templates/projects" },
        { "key": "NoQdsProjectStyle", "value": "%{JS: !%{QdsProjectStyle} }" },

        { "key": "AssetDir", "value": "Generated" },
        { "key": "ContentDir", "value": "%{ProjectName}Content" },
        { "key": "ImportModuleName", "value": "%{ProjectName}" },
        { "key": "ImportModuleVersion", "value": "" },
        { "key": "IsQt6Project", "value": true },
        { "key": "QtQuickControlsStyle", "value": "Material" },
        { "key": "QtQuickControlsStyleTheme", "value": "Light" },
        { "key": "QtQuickVersion", "value": "6.5" },
        { "key": "ScreenHeight", "value": 1080 },
        { "key": "ScreenWidth", "value": 1920 },
        { "key": "UIClassName", "value": "Screen01" }
    ],

    "pages":
    [
        {
            "trDisplayName": "Project Location",
            "trShortTitle": "Location",
            "typeId": "Project"
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
            [
                {
                    "name": "QdsProjectStyle",
                    "trDisplayName": "Create a project that you can open in Qt Design Studio",
                    "trToolTip": "Creates a project with a structure that is compatible both with Qt Design Studio and with Qt Creator. It contains a .ui.qml form that you can visually edit in Qt Design Studio.",
                    "type": "CheckBox",
                    "persistenceKey": "QtQuick.QdsProjectStyle",
                    "data":
                    {
                        "checked": false
                    }
                },
                {
                    "name": "UseVirtualKeyboard",
                    "trDisplayName": "Use Qt Virtual Keyboard",
                    "type": "CheckBox",
                    "data":
                    {
                        "checked": "%{UseVirtualKeyboardByDefault}"
                    }
                }
            ]
        },
        {
            "trDisplayName": "Kit Selection",
            "trShortTitle": "Kits",
            "typeId": "Kits",
            "data": {
                "projectFilePath": "%{QmlProjectFileName}",
                "requiredFeatures": [ "QtSupport.Wizards.FeatureQtQuickProject", "QtSupport.Wizards.FeatureQtQuick.6" ]
            }
        },
        {
            "trDisplayName": "Project Management",
            "trShortTitle": "Summary",
            "typeId": "Summary"
        }
    ],
    "generators":
    [
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "app.qmlproject",
                    "target": "%{QmlProjectFileName}",
                    "openAsProject": true,
                    "condition": "%{NoQdsProjectStyle}"
                },
                {
                    "source": "../qtquickapplication/Main.qml.tpl",
                    "target": "%{ProjectDirectory}/%{MainQmlFileName}",
                    "openInEditor": true,
                    "condition": "%{NoQdsProjectStyle}"
                },
                {
                    "source": "../git.ignore",
                    "target": "%{ProjectDirectory}/.gitignore",
                    "condition": "%{JS: %{NoQdsProjectStyle} && !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
                }
            ]
        },
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "%{QdsWizardPath}/common/app.qmlproject.tpl",
                    "target": "%{QmlProjectFileName}",
                    "openAsProject": true,
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/common/qtquickcontrols2.conf.tpl",
                    "target": "%{ProjectDirectory}/qtquickcontrols2.conf",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/common/App.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ContentDir}/App.qml",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/application/Screen01.ui.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/common/fonts.txt",
                    "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/common/images.txt",
                    "target": "%{ProjectDirectory}/%{ContentDir}/images/images.txt",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/common/asset_imports.txt",
                    "target": "%{ProjectDirectory}/%{AssetDir}/Quick3DAssets.txt",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/shared-plugin/name/importmodule.qmldir.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/shared-plugin/name/Constants.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/shared-plugin/name/EventListModel.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/shared-plugin/name/EventListSimulator.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml",
                    "condition": "%{QdsProjectStyle}"
                },
                {
                    "source": "%{QdsWizardPath}/shared-plugin/name/designer/plugin.metainfo",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo",
                    "condition": "%{QdsProjectStyle}"
                }
            ]
        }
    ]
}
