{
    "description": {
        "author": "Salesforce",
        "text": [
            "Page Object: uiConfigCodeView",
            "Selector: mcontent_lightning_types-ui-config-code-view",
            "Modal displaying code view of UI configuration"
        ]
    },
    "root": true,
    "selector": {
        "css": "mcontent_lightning_types-ui-config-code-view"
    },
    "shadow": {
        "elements": [
            {
                "public": true,
                "name": "modalHeader",
                "type": "utam-lightning/pageObjects/modalHeader",
                "selector": {
                    "css": "lightning-modal-header"
                }
            },
            {
                "public": true,
                "name": "modalBody",
                "type": "utam-lightning/pageObjects/modalBody",
                "selector": {
                    "css": "lightning-modal-body"
                }
            },
            {
                "public": true,
                "name": "codeTextarea",
                "type": "utam-lightning/pageObjects/textarea",
                "selector": {
                    "css": "textarea#config"
                }
            },
            {
                "public": true,
                "name": "modalFooter",
                "type": "utam-lightning/pageObjects/modalFooter",
                "selector": {
                    "css": "lightning-modal-footer"
                }
            },
            {
                "public": true,
                "name": "closeButton",
                "type": "utam-lightning/pageObjects/button",
                "selector": {
                    "css": "lightning-modal-footer lightning-button"
                }
            }
        ]
    },
    "methods": [
        {
            "name": "waitForModalVisible",
            "description": "Waits for the code view modal to be visible",
            "compose": [
                {
                    "element": "modalHeader",
                    "apply": "waitForVisible"
                }
            ]
        },
        {
            "name": "getCodeContent",
            "description": {
                "text": [
                    "Gets the code content from the textarea"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "codeTextarea",
                    "apply": "getValue"
                }
            ]
        },
        {
            "name": "clickClose",
            "description": "Clicks the Close button to dismiss the modal",
            "compose": [
                {
                    "element": "closeButton",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "isCodeTextareaReadOnly",
            "description": {
                "text": [
                    "Checks if the code textarea is read-only"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "codeTextarea",
                    "apply": "isReadonly"
                }
            ]
        }
    ]
}