{
    "description": {
        "author": "Salesforce",
        "text": [
            "Selector: webruntimedesign-email-component-node",
            "Represents the canvas iframe content with shadow root navigation to actualNode elements."
        ]
    },
    "root": true,
    "selector": {
        "css": "webruntimedesign-email-component-node"
    },
    "beforeLoad": [
        {
            "apply": "waitFor",
            "args": [
                {
                    "type": "function",
                    "name": "unused",
                    "predicate": [
                        {
                            "element": "root",
                            "apply": "containsElement",
                            "args": [
                                {
                                    "type": "locator",
                                    "value": {
                                        "css": "div.interactions-component.interactions-element"
                                    }
                                },
                                {
                                    "value": true
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "shadow": {
        "elements": [
            {
                "name": "inlineEditWrapper",
                "public": true,
                "nullable": true,
                "selector": {
                    "css": "es_design-inline-edit-wrapper"
                },
                "elements": [
                    {
                        "name": "mergeFieldPicker",
                        "public": true,
                        "selector": {
                            "css": "builder_framework-merge-field-picker"
                        },
                        "type": "utam-builder-framework/pageObjects/mergeFieldPicker"
                    },
                    {
                        "name": "textPicker",
                        "public": true,
                        "selector": {
                            "css": "runtime_sales_easy-text-picker"
                        },
                        "type": "utam-easy-components/pageObjects/textPicker"
                    }
                ]
            },
            {
                "name": "proxySelectToolbox",
                "public": true,
                "nullable": true,
                "selector": {
                    "css": "section.proxy-select-toolbox"
                },
                "elements": [
                    {
                        "name": "toolbarGroups",
                        "public": true,
                        "selector": {
                            "css": "es_design-toolbar > es_design-toolbar-group",
                            "returnAll": true
                        },
                        "elements": [
                            {
                                "name": "toolbarButtons",
                                "public": true,
                                "nullable": true,
                                "selector": {
                                    "css": "es_design-toolbar-button",
                                    "returnAll": true
                                }
                            }
                        ]
                    },
                    {
                        "name": "mergeFieldPickerButton",
                        "public": true,
                        "nullable": true,
                        "selector": {
                            "css": "es_design-toolbar-button[data-id='merge-field-picker']"
                        },
                        "type": "clickable"
                    },
                    {
                        "name": "toolbarButtonByDataId",
                        "public": true,
                        "nullable": true,
                        "type": "clickable",
                        "selector": {
                            "css": "es_design-toolbar-button[data-id='%s']",
                            "args": [
                                {
                                    "name": "dataId",
                                    "type": "string"
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "name": "interactionsElements",
                "public": true,
                "selector": {
                    "css": "div.interactions-component.interactions-element",
                    "returnAll": true
                },
                "elements": [
                    {
                        "name": "actualNodeTable",
                        "public": true,
                        "nullable": true,
                        "selector": {
                            "css": "div.actualNode > table"
                        }
                    }
                ]
            },
            {
                "name": "interactionsElementByDataComponentLabel",
                "public": true,
                "nullable": true,
                "type": "clickable",
                "selector": {
                    "css": "div.interactions-component.interactions-element[data-component-label='%s']",
                    "args": [
                        {
                            "name": "label",
                            "type": "string"
                        }
                    ]
                }
            },
            {
                "name": "toolbarEditButton",
                "public": true,
                "nullable": true,
                "type": "clickable",
                "selector": {
                    "css": "es_design-toolbar-button[data-id='text-style-edit']"
                }
            },
            {
                "name": "toolbarAlignmentMenu",
                "public": true,
                "nullable": true,
                "type": "clickable",
                "selector": {
                    "css": "es_design-toolbar-button-menu[data-id='alignment-button-menu'] lightning-button-menu"
                },
                "elements": [
                    {
                        "name": "alignmentMenuItems",
                        "public": true,
                        "selector": {
                            "css": "lightning-menu-item",
                            "returnAll": true
                        }
                    },
                    {
                        "name": "alignLeftMenuItem",
                        "public": true,
                        "nullable": true,
                        "type": "clickable",
                        "selector": {
                            "css": "lightning-menu-item[data-id='align-left']"
                        }
                    },
                    {
                        "name": "alignCenterMenuItem",
                        "public": true,
                        "nullable": true,
                        "type": "clickable",
                        "selector": {
                            "css": "lightning-menu-item[data-id='align-center']"
                        }
                    },
                    {
                        "name": "alignRightMenuItem",
                        "public": true,
                        "nullable": true,
                        "type": "clickable",
                        "selector": {
                            "css": "lightning-menu-item[data-id='align-right']"
                        }
                    }
                ]
            },
            {
                "name": "buttonContainer",
                "public": true,
                "nullable": true,
                "selector": {
                    "css": "div.interactions-component.interactions-element[data-component-label='Button'] runtime_sales_easy-action-button-inline-edit div.slds-grid"
                }
            },
            {
                "name": "contentEditableTextInput",
                "public": true,
                "nullable": true,
                "type": "editable",
                "selector": {
                    "css": "span.content-container[contenteditable='true']"
                }
            }
        ]
    },
    "methods": [
        {
            "name": "waitForProxySelectToolboxVisible",
            "description": {
                "text": [
                    "Waits for the toolbar to be visible"
                ]
            },
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "root",
                                    "apply": "containsElement",
                                    "args": [
                                        {
                                            "type": "locator",
                                            "value": {
                                                "css": "section.proxy-select-toolbox"
                                            }
                                        },
                                        {
                                            "value": true
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "name": "waitForToolbarGroupsSizeOverThree",
            "description": "Waits for the size of toolbar groups to be over 3",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "root",
                                    "apply": "containsElement",
                                    "args": [
                                        {
                                            "type": "locator",
                                            "value": {
                                                "css": "section.proxy-select-toolbox es_design-toolbar > es_design-toolbar-group:nth-child(4)"
                                            }
                                        },
                                        {
                                            "value": true
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "name": "clickMergeFieldPickerButton",
            "description": "Clicks the merge field picker button in toolbar",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "mergeFieldPickerButton"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "mergeFieldPickerButton"
                }
            ]
        },
        {
            "name": "clickToolbarEditButton",
            "description": "Clicks the Edit button in the floating toolbar",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "toolbarEditButton"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "toolbarEditButton"
                }
            ]
        },
        {
            "name": "clickToolbarAlignmentMenu",
            "description": "Clicks the alignment button menu in the toolbar",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "toolbarAlignmentMenu"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "toolbarAlignmentMenu"
                }
            ]
        },
        {
            "name": "selectAlignLeft",
            "description": "Selects the align left option from the alignment menu",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "alignLeftMenuItem"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "alignLeftMenuItem"
                }
            ]
        },
        {
            "name": "selectAlignCenter",
            "description": "Selects the align center option from the alignment menu",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "alignCenterMenuItem"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "alignCenterMenuItem"
                }
            ]
        },
        {
            "name": "selectAlignRight",
            "description": "Selects the align right option from the alignment menu",
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "alignRightMenuItem"
                                }
                            ]
                        }
                    ]
                },
                {
                    "apply": "click",
                    "element": "alignRightMenuItem"
                }
            ]
        }
    ]
}