// Copyright (c) 2009-2026 SAP SE, All Rights Reserved

/**
 * @fileOverview Default CDM site data for the Fiori Launchpad Sandbox.
 *
 * This module provides the base site structure used by the sandbox environment,
 * following the Common Data Model (CDM) format. It includes:
 * - Pre-configured applications including the NavigationSample demo app
 * - Sample catalogs and menus for the sandbox site
 * - Default page layout with sections for custom apps and samples
 * - Visualization definitions for application tiles
 *
 * The site data can be extended dynamically via the `fioriSandboxAppConfig.json` file
 * to add custom applications for local development.
 *
 * @version 1.148.1
 * @since 1.147
 */
sap.ui.define([], () => {
    "use strict";

    /* eslint-disable quote-props */
    /**
     * Default CDM site data structure for the sandbox.
     *
     * @type {object}
     * @property {string} _version - CDM schema version
     * @property {object} applications - Map of application configurations
     * @property {object} catalogs - Catalog definitions for tile organization
     * @property {object} menus - Menu structure for space navigation
     * @property {object} pages - Page layouts with sections and visualizations
     * @property {object} site - Site identification and global configuration
     * @property {object} visualizations - Tile visualization configurations
     * @property {object} groups - Legacy group definitions for classic home page
     * @private
     */
    return {
        "_version": "3.1.0",
        "applications": {
            "sap.ushell.sandbox.NavigationSample": {
                "sap.app": {
                    "applicationVersion": {
                        "version": "1.0.0"
                    },
                    "crossNavigation": {
                        "inbounds": {
                            "target": {
                                "action": "toNavigationSample",
                                "semanticObject": "Action",
                                "signature": {
                                    "additionalParameters": "allowed",
                                    "parameters": {}
                                }
                            }
                        }
                    },
                    "id": "sap.ushell.sandbox.NavigationSample",
                    "subTitle": "for testing navigation sample app",
                    "title": "Navigation Sample App"
                },
                "sap.flp": {
                    "type": "application"
                },
                "sap.ui": {
                    "deviceTypes": {
                        "desktop": true,
                        "phone": true,
                        "tablet": true
                    },
                    "icons": {
                        "icon": "sap-icon://favorite"
                    },
                    "technology": "UI5"
                },
                "sap.ui5": {
                    "componentName": "sap.ushell.sandbox.NavigationSample"
                }
            },
            "userdefaultplugin": {
                "sap.app": {
                    "applicationVersion": {
                        "version": "1.0.0"
                    },
                    "crossNavigation": {
                        "inbounds": {
                            "Shell-plugin": {
                                "action": "plugin",
                                "semanticObject": "Shell",
                                "signature": {
                                    "additionalParameters": "ignored",
                                    "parameters": {
                                        "localMode": {
                                            "defaultValue": {
                                                "value": "true"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "id": "userdefaultplugin",
                    "subTitle": "An App with a dynamic tile",
                    "title": "Dynamic Nr.."
                },
                "sap.flp": {
                    "type": "plugin"
                },
                "sap.platform.runtime": {
                    "componentProperties": {
                        "config": {
                            "sap-ushell-plugin-type": "UserDefaults"
                        },
                        "url": "../../demoapps/UserDefaultPluginSample"
                    }
                },
                "sap.ui": {
                    "deviceTypes": {
                        "desktop": true,
                        "phone": true,
                        "tablet": true
                    },
                    "technology": "UI5"
                },
                "sap.ui5": {
                    "componentName": "sap.ushell.demo.UserDefaultPluginSample"
                }
            }
        },
        "catalogs": {
            "SampleCatalog": {
                "identification": {
                    "id": "SampleCatalog",
                    "title": "Sample Applications"
                },
                "payload": {
                    "viz": [
                        "navigationSampleApp"
                    ]
                }
            }
        },
        "menus": {
            "main": {
                "identification": {
                    "id": "main"
                },
                "payload": {
                    "menuEntries": [
                        {
                            "description": "Example applications",
                            "help-id": "Space-space01",
                            "icon": "sap-icon://syringe",
                            "id": "space01",
                            "target": {
                                "action": "openFLPPage",
                                "parameters": [
                                    {
                                        "name": "pageId",
                                        "value": "page1"
                                    },
                                    {
                                        "name": "spaceId",
                                        "value": "space01"
                                    }
                                ],
                                "semanticObject": "Launchpad"
                            },
                            "title": "Sample Space",
                            "type": "IBN"
                        }
                    ]
                }
            }
        },
        "pages": {
            "page1": {
                "identification": {
                    "id": "page1",
                    "title": "Sample Page"
                },
                "payload": {
                    "layout": {
                        "sectionOrder": [
                            "APPS",
                            "SAMPLES"
                        ]
                    },
                    "sections": {
                        "APPS": {
                            "id": "APPS",
                            "layout": {
                                "vizOrder": []
                            },
                            "title": "My Home",
                            "viz": {}
                        },
                        "SAMPLES": {
                            "id": "SAMPLES",
                            "layout": {
                                "vizOrder": [
                                    "vizNavigationSampleApp"
                                ]
                            },
                            "title": "Sample Applications",
                            "viz": {
                                "vizNavigationSampleApp": {
                                    "id": "vizNavigationSampleApp",
                                    "vizId": "navigationSampleApp"
                                }
                            }
                        }
                    }
                }
            }
        },
        "site": {
            "identification": {
                "description": "FLP sandbox",
                "id": "c9dcc1f3-dec0-4db4-91d3-639bf38d91ce",
                "namespace": "",
                "title": "Sandbox site"
            },
            "payload": {
                "config": {
                    "ushellConfig": {
                        "renderers": {
                            "fiori2": {
                                "componentData": {
                                    "config": {
                                        "enableSearch": false
                                    }
                                }
                            }
                        }
                    }
                },
                "groupsOrder": [
                    "SAMPLES"
                ]
            }
        },
        "systemAliases": {},
        "visualizations": {
            "navigationSampleApp": {
                "vizConfig": {
                    "sap.flp": {
                        "target": {
                            "appId": "sap.ushell.sandbox.NavigationSample",
                            "inboundId": "target"
                        }
                    }
                },
                "vizType": "sap.ushell.StaticAppLauncher"
            }
        },
        "groups": {
            "SAMPLES": {
                "identification": {
                    "id": "SAMPLES",
                    "title": "Samples"
                },
                "payload": {
                    "tiles": [
                        {
                            "id": "vizNavigationSampleApp",
                            "vizId": "navigationSampleApp"
                        }
                    ]
                }
            }
        }
    };
});
