{
    "description": {
        "author": "Salesforce",
        "text": [
            "Component that provides a prompt interface with input, recommendations, and actions.",
            "Selector: experience_ui_gen_canvas-prompt-bar"
        ]
    },
    "shadow": {
        "elements": [
            {
                "name": "recommendationItemsContainer",
                "selector": {
                    "css": "experience_ui_gen_canvas-recommendation-items"
                },
                "description": "Represents the container for recommendation items",
                "nullable": true
            },
            {
                "name": "closeRecommendationsButton",
                "selector": {
                    "css": ".top-right lightning-button-icon"
                },
                "description": "Represents the close button for recommendations panel",
                "nullable": true,
                "public": true,
                "type": "clickable"
            },
            {
                "name": "promptField",
                "type": "editable",
                "selector": {
                    "css": "lightning-input[data-prompt-input]"
                },
                "description": "Represents the input field for user text",
                "nullable": true,
                "public": true
            },
            {
                "name": "sendButtonIcon",
                "selector": {
                    "css": "lightning-button-icon[icon-name=\"utility:sparkle\"]"
                },
                "description": "Represents the send button with sparkle icon",
                "nullable": true,
                "public": true,
                "type": "clickable"
            },
            {
                "name": "disclaimerText",
                "selector": {
                    "css": ".disclaimer:not(.limit-error)"
                },
                "description": "Represents the disclaimer text"
            },
            {
                "name": "limitErrorAddTile",
                "selector": {
                    "css": ".limit-error.disclaimer:nth-of-type(2)"
                },
                "description": "Represents the error message for add tile limit reached",
                "nullable": true
            },
            {
                "name": "limitErrorAddCanvas",
                "selector": {
                    "css": ".limit-error.disclaimer:nth-of-type(3)"
                },
                "description": "Represents the error message for add canvas limit reached",
                "nullable": true
            },
            {
                "name": "chatInputContainer",
                "selector": {
                    "css": ".chat-input-container"
                },
                "description": "Represents the container for the chat input"
            },
            {
                "name": "floatingFooter",
                "selector": {
                    "css": ".floating-footer"
                },
                "description": "Represents the floating footer container"
            }
        ]
    },
    "methods": [
        {
            "name": "clickCloseRecommendations",
            "description": {
                "text": [
                    "Click on the close button for recommendations"
                ]
            },
            "compose": [
                {
                    "element": "closeRecommendationsButton",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "enterPrompt",
            "description": {
                "text": [
                    "Enter text into the prompt field"
                ]
            },
            "compose": [
                {
                    "element": "promptField",
                    "apply": "setText",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "name": "clickSendButton",
            "description": {
                "text": [
                    "Click on the send button"
                ]
            },
            "compose": [
                {
                    "element": "sendButtonIcon",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "isRecommendationsVisible",
            "description": {
                "text": [
                    "Check if the recommendations container is visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "recommendationItemsContainer",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "getDisclaimerText",
            "description": {
                "text": [
                    "Get the disclaimer text"
                ],
                "return": "String"
            },
            "compose": [
                {
                    "element": "disclaimerText",
                    "apply": "getText"
                }
            ]
        },
        {
            "name": "isLimitErrorAddTileVisible",
            "description": {
                "text": [
                    "Check if the limit error for add tile is visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "limitErrorAddTile",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isLimitErrorAddCanvasVisible",
            "description": {
                "text": [
                    "Check if the limit error for add canvas is visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "limitErrorAddCanvas",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isSendButtonDisabled",
            "description": {
                "text": [
                    "Check if the send button is disabled"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "sendButtonIcon",
                    "apply": "getAttribute",
                    "args": [
                        {
                            "value": "data-is-disabled"
                        }
                    ]
                }
            ]
        },
        {
            "name": "verifyRecommendationsPresence",
            "description": {
                "text": [
                    "Returns true if recommendations container is present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "recommendationItemsContainer",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyLimitErrorAddTilePresence",
            "description": {
                "text": [
                    "Returns true if element \"limitErrorAddTile\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "limitErrorAddTile",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyLimitErrorAddCanvasPresence",
            "description": {
                "text": [
                    "Returns true if element \"limitErrorAddCanvas\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "limitErrorAddCanvas",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "isPanelOpen",
            "description": {
                "text": [
                    "Check if the panel is open"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "floatingFooter",
                    "apply": "getAttribute",
                    "args": [
                        {
                            "value": "data-panel-open"
                        }
                    ]
                }
            ]
        }
    ]
}