{
    "root": true,
    "selector": {
        "css": "src-explorer-view"
    },
    "description": {
        "author": "Salesforce",
        "text": [
            "Component that displays a tree view of items when data is ready, or shows various error or loading states based on the component's state.",
            "Selector: src-explorer-view"
        ]
    },
    "shadow": {
        "elements": [
            {
                "name": "explorerFlexParent",
                "selector": {
                    "css": ".explorer-flex-parent"
                },
                "description": "Represents the parent container for the explorer component",
                "elements": [
                    {
                        "name": "itemsLabel",
                        "selector": {
                            "css": "p.slds-text-color_inverse-weak"
                        },
                        "description": "Represents the label displaying the items count",
                        "nullable": true,
                        "wait": true
                    },
                    {
                        "name": "container",
                        "selector": {
                            "css": "div.container"
                        },
                        "description": "Represents the container for the tree grid",
                        "nullable": true,
                        "public": true,
                        "elements": [
                            {
                                "name": "lightningTreeGrid",
                                "selector": {
                                    "css": "lightning-tree-grid"
                                },
                                "type": "utam-lightning/pageObjects/treeGrid",
                                "description": "Represents the tree grid component",
                                "nullable": true,
                                "public": true
                            },
                            {
                                "name": "treeGridRows",
                                "selector": {
                                    "css": "lightning-tree-grid lightning-datatable div div div table tbody tr[data-row-number]",
                                    "returnAll": true
                                },
                                "description": "Represents the tree grid rows"
                            }
                        ]
                    },
                    {
                        "name": "invalidMetadataIdContainer",
                        "selector": {
                            "css": "div.slds-illustration[if:true='%s']",
                            "args": [
                                {
                                    "name": "selectorStr",
                                    "type": "string",
                                    "description": "CSS selector parameter"
                                }
                            ]
                        },
                        "description": "Represents the container for the invalid metadata ID state",
                        "nullable": true,
                        "elements": [
                            {
                                "name": "invalidMetadataIdImage",
                                "selector": {
                                    "css": "img"
                                },
                                "description": "Represents the image for the invalid metadata ID state"
                            },
                            {
                                "name": "invalidMetadataIdHeading",
                                "selector": {
                                    "css": "h3.slds-text-heading_medium"
                                },
                                "description": "Represents the heading for the invalid metadata ID state"
                            },
                            {
                                "name": "invalidMetadataIdMessage",
                                "selector": {
                                    "css": "p.no-connection-text"
                                },
                                "description": "Represents the message for the invalid metadata ID state"
                            }
                        ]
                    },
                    {
                        "name": "serviceErrorContainer",
                        "selector": {
                            "css": "div.slds-illustration[if:true='%s']",
                            "args": [
                                {
                                    "name": "selectorStr",
                                    "type": "string",
                                    "description": "CSS selector parameter"
                                }
                            ]
                        },
                        "description": "Represents the container for the service error state",
                        "nullable": true,
                        "elements": [
                            {
                                "name": "serviceErrorImage",
                                "selector": {
                                    "css": "img"
                                },
                                "description": "Represents the image for the service error state"
                            },
                            {
                                "name": "serviceErrorHeading",
                                "selector": {
                                    "css": "h3.slds-text-heading_medium"
                                },
                                "description": "Represents the heading for the service error state"
                            },
                            {
                                "name": "serviceErrorMessage",
                                "selector": {
                                    "css": "p.no-connection-text"
                                },
                                "description": "Represents the message for the service error state"
                            }
                        ]
                    },
                    {
                        "name": "loadingStateContainer",
                        "selector": {
                            "css": "div.slds-illustration[if:true='%s']",
                            "args": [
                                {
                                    "name": "selectorStr",
                                    "type": "string",
                                    "description": "CSS selector parameter"
                                }
                            ]
                        },
                        "description": "Represents the container for the loading state",
                        "nullable": true,
                        "elements": [
                            {
                                "name": "loadingStateImage",
                                "selector": {
                                    "css": "img"
                                },
                                "description": "Represents the image for the loading state"
                            },
                            {
                                "name": "loadingStateHeading",
                                "selector": {
                                    "css": "h3.slds-text-heading_medium"
                                },
                                "description": "Represents the heading for the loading state"
                            },
                            {
                                "name": "loadingStateMessage",
                                "selector": {
                                    "css": "p.no-connection-text"
                                },
                                "description": "Represents the message for the loading state"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "methods": [
        {
            "name": "isExplorerFlexParentVisible",
            "description": {
                "text": [
                    "Check that explorer flex parent is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "explorerFlexParent",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isItemsLabelVisible",
            "description": {
                "text": [
                    "Check that items label is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "itemsLabel",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isContainerVisible",
            "description": {
                "text": [
                    "Check that container is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "container",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isInvalidMetadataIdContainerVisible",
            "description": {
                "text": [
                    "Check that invalid metadata ID container is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "invalidMetadataIdContainer",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isInvalidMetadataIdImageVisible",
            "description": {
                "text": [
                    "Check that invalid metadata ID image is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "invalidMetadataIdImage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isInvalidMetadataIdHeadingVisible",
            "description": {
                "text": [
                    "Check that invalid metadata ID heading is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "invalidMetadataIdHeading",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isInvalidMetadataIdMessageVisible",
            "description": {
                "text": [
                    "Check that invalid metadata ID message is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "invalidMetadataIdMessage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isServiceErrorContainerVisible",
            "description": {
                "text": [
                    "Check that service error container is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "serviceErrorContainer",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isServiceErrorImageVisible",
            "description": {
                "text": [
                    "Check that service error image is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "serviceErrorImage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isServiceErrorHeadingVisible",
            "description": {
                "text": [
                    "Check that service error heading is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "serviceErrorHeading",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isServiceErrorMessageVisible",
            "description": {
                "text": [
                    "Check that service error message is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "serviceErrorMessage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isLoadingStateContainerVisible",
            "description": {
                "text": [
                    "Check that loading state container is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "loadingStateContainer",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isLoadingStateImageVisible",
            "description": {
                "text": [
                    "Check that loading state image is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "loadingStateImage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isLoadingStateHeadingVisible",
            "description": {
                "text": [
                    "Check that loading state heading is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "loadingStateHeading",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "isLoadingStateMessageVisible",
            "description": {
                "text": [
                    "Check that loading state message is present and visible"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "loadingStateMessage",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "verifyItemsLabelPresence",
            "description": {
                "text": [
                    "Returns true if element \"itemsLabel\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "itemsLabel",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyContainerPresence",
            "description": {
                "text": [
                    "Returns true if element \"container\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "container",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyInvalidMetadataIdContainerPresence",
            "description": {
                "text": [
                    "Returns true if element \"invalidMetadataIdContainer\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "invalidMetadataIdContainer",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyServiceErrorContainerPresence",
            "description": {
                "text": [
                    "Returns true if element \"serviceErrorContainer\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "serviceErrorContainer",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "verifyLoadingStateContainerPresence",
            "description": {
                "text": [
                    "Returns true if element \"loadingStateContainer\" present on the page"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "loadingStateContainer",
                    "matcher": {
                        "type": "notNull"
                    }
                }
            ]
        },
        {
            "name": "getTreeGridRowsCount",
            "description": {
                "text": [
                    "Get the number of tree grid rows"
                ],
                "return": "number"
            },
            "compose": [
                {
                    "element": "treeGridRows",
                    "apply": "size"
                }
            ]
        }
    ]
}