{
    "document": {
        "type": "APL",
        "version": "1.1",
        "layouts": {
            "BackgroundDynamicPager": {
                "description": "A dynamic screen pager that takes layouts of any specified 'layout' type.",
                "parameters": [
                    "data"
                ],
                "item": [
                    {
                        "type": "Pager",
                        "id": "primaryPager",
                        "navigation": "none",
                        "initialPage": 0,
                        "width": "100%",
                        "height": "100%",
                        "data": "${data}",
                        "items": [
                            {
                                "position": "absolute",
                                "type": "${data.layout}",
                                "pgIndex": "${index}"
                            }
                        ]
                    }
                ]
            },
            "BackgroundLayout": {
                "parameters": [
                    "pgIndex"
                ],
                "item": {
                    "type": "Container",
                    "width": "100%",
                    "height": "100%",
                    "alignItems": "center",
                    "justifyContent": "center",
                    "items": [
                        {
                            "id": "sampleBackground",
                            "type": "Image",
                            "source": "${data.background}",
                            "position": "absolute",
                            "width": "100vw",
                            "height": "100vh",
                            "scale": "best-fill"
                        },
                        {
                            "id": "aplVisualDemoText",
                            "type": "Text",
                            "text": "${data.title}",
                            "textAlign": "center",
                            "position": "absolute",
                            "width": "100vw",
                            "height": "20vh",
                            "top": "5vh",
                            "fontSize": 50
                        },
                        {
                            "type": "Text",
                            "color": "#FFFFFF",
                            "text": "${data.subtitle}",
                            "top": "20vh"
                        }
                    ]
                }
            }
        },
        "mainTemplate": {
            "description": "********* Minimal APL document **********",
            "parameters": [
                "payload"
            ],
            "items": [
                {
                    "type": "Container",
                    "width": "100%",
                    "height": "100%",
                    "alignItems": "center",
                    "justifyContent": "center",
                    "items": [
                        {
                            "id": "SFBAudioAndAlexaSpeechContainer",
                            "description": "Please do not remove or change the ID of this component. Skill Flow Builder uses this id to play audio files and to add Alexa SpeakItem text blocks.",
                            "type": "Container",
                            "items": [
                                {
                                    "type": "Video",
                                    "id": "audioPlayerId",
                                    "description": "Please do not change this ID, skill flow builder uses this component to play audio files from your content.",
                                    "autoplay": false,
                                    "width": "0",
                                    "height": "0"
                                }
                            ]
                        },
                        {
                            "position": "absolute",
                            "type": "BackgroundDynamicPager",
                            "data": "${payload.visualProperties.scenes}"
                        },
                        {
                            "position": "absolute",
                            "textAlign": "center",
                            "top": "10vh",
                            "left": "0vw",
                            "height": "20vh",
                            "width": "100vw",
                            "type": "Text",
                            "color": "#FFFFFF",
                            "text": "${payload.visualProperties.title}"
                        },
                        {
                            "type": "Text",
                            "color": "#FFFFFF",
                            "text": "${payload.visualProperties.subtitle}",
                            "top": "20vh"
                        }
                    ]
                }
            ]
        }
    },
    "datasources": {
        "visualProperties": {
            "scenes": [
                {
                    "layout": "BackgroundLayout",
                    "background": "https://sfb-framework.s3.amazonaws.com/examples/images/dark-background.jpg"
                }
            ]
        }
    }
}