{
    "description": {
        "author": "Salesforce",
        "text": [
            "Selector: **/XCUIElementTypeWindow[$name == 'All Lists' OR name == 'nav.AllItems'$].",
            "Represents the iOS  'All Lists' window of an object.",
            "Find a record by label, and get its title or navigate to it."
        ]
    },
    "implements": "utam-salesforceapp/pageObjects/record/objectAllLists",
    "platform": "native",
    "profile": [
        {
            "platform": [
                "ios_phone",
                "ios_tablet"
            ]
        }
    ],
    "exposeRootElement": true,
    "type": [
        "actionable",
        "touchable"
    ],
    "root": true,
    "beforeLoad": [
        {
            "apply": "waitFor",
            "args": [
                {
                    "type": "function",
                    "predicate": [
                        {
                            "element": "root",
                            "apply": "isPresent"
                        }
                    ]
                }
            ]
        }
    ],
    "selector": {
        "classchain": "**/XCUIElementTypeWindow[$name == 'All Lists' OR name == 'nav.AllItems'$]"
    },
    "elements": [
        {
            "name": "visibleListCells",
            "public": true,
            "type": [
                "clickable",
                "actionable"
            ],
            "selector": {
                "classchain": "**/XCUIElementTypeCell[`name == 'searchCell.listViewCell'`]/**/XCUIElementTypeStaticText[`name == 'searchCell.textLabel' AND visible == true`]",
                "returnAll": true
            }
        },
        {
            "name": "searchBar",
            "type": "utam-salesforceapp/pageObjects/navigation/searchBar",
            "public": true,
            "selector": {
                "classchain": "**/XCUIElementTypeNavigationBar[$type == 'XCUIElementTypeSearchField'$]"
            }
        },
        {
            "name": "visibleListWithLabel",
            "type": [
                "clickable",
                "actionable"
            ],
            "public": true,
            "nullable": true,
            "selector": {
                "classchain": "**/XCUIElementTypeCell[`name == 'searchCell.listViewCell'`]/**/XCUIElementTypeStaticText[`visible == true AND name == 'searchCell.textLabel' AND label == '%s'`]",
                "args": [
                    {
                        "name": "label",
                        "type": "string"
                    }
                ]
            }
        }
    ],
    "methods": [
        {
            "name": "hasListCell",
            "compose": [
                {
                    "returnType": "boolean",
                    "applyExternal": {
                        "type": "utam-salesforceapp/utils/record/objectAllListsiOSUtils",
                        "invoke": "hasList",
                        "args": [
                            {
                                "name": "label",
                                "type": "string"
                            }
                        ]
                    }
                }
            ]
        },
        {
            "name": "clickListCellWithLabel",
            "compose": [
                {
                    "applyExternal": {
                        "type": "utam-salesforceapp/utils/record/objectAllListsiOSUtils",
                        "invoke": "clickListCell",
                        "args": [
                            {
                                "name": "label",
                                "type": "string"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}