{
    "description": {
        "author": "Salesforce",
        "text": [
            "Selector: lightning-lookup",
            "Represents the lightning-lookup Lightning web component."
        ]
    },
    "methods": [
        {
            "name": "deletePill",
            "description": {
                "text": [
                    "Delete pill by index. Should only be used in a multi-value lookup use-case  (starts at 1)."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "deletePill",
                    "args": [
                        {
                            "name": "index",
                            "type": "number"
                        }
                    ]
                }
            ]
        },
        {
            "name": "deleteAllPills",
            "description": {
                "text": [
                    "Delete all the selected records from the pill container. Should only be used in a multi-value lookup use-case."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "deleteAllPills"
                }
            ]
        },
        {
            "name": "getAllPills",
            "description": {
                "text": [
                    "Get all the selected records label from the pill container. Should only be used in a multi-value lookup use-case."
                ],
                "return": "string[]"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "getAllPills",
                    "returnAll": true,
                    "returnType": "string"
                }
            ]
        },
        {
            "name": "type",
            "description": {
                "text": [
                    "Type a text into the combobox input."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "type",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "name": "getInputText",
            "description": {
                "text": [
                    "Gets the input text"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "getInputText",
                    "returnType": "string"
                }
            ]
        },
        {
            "name": "selectRecordSuggestionByLabel",
            "description": {
                "text": [
                    "Select a record in the combobox by label. If the record has a secondary field, ",
                    "it must be included in the label after the primary field (record's name) separated ",
                    "with a `\\n` character (e.g. MyRecordName\\nMyRecordSecondaryField)"
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "selectRecordSuggestionByLabel",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "name": "selectFromList",
            "description": {
                "deprecated": "in Spring '24 release, use selectRecordSuggestionByLabel",
                "text": [
                    "Select an item in the combobox by value."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "returnType": "utam-lightning/pageObjects/baseCombobox",
                    "apply": "getBaseCombobox"
                },
                {
                    "chain": true,
                    "returnType": "utam-lightning/pageObjects/baseComboboxItem",
                    "element": "itemByValue",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                },
                {
                    "chain": true,
                    "apply": "clickItem"
                }
            ]
        },
        {
            "name": "getSelectedRecordLabel",
            "description": {
                "text": [
                    "Gets the label of the selected record"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "getSelectedRecordLabel",
                    "returnType": "string"
                }
            ]
        },
        {
            "name": "hasSelectedRecord",
            "description": {
                "text": [
                    "Did we select a record?"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "hasSelectedRecord",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "clearSelectedRecord",
            "description": {
                "text": [
                    "Clears the selected record. Should only be used in a single-value lookup use-case."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "clearSelectedRecord"
                }
            ]
        },
        {
            "name": "getSelectedEntity",
            "description": {
                "text": [
                    "Returns the selected entity of the entity selector"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "getSelectedEntity",
                    "returnType": "string"
                }
            ]
        },
        {
            "name": "selectEntityInEntitySelector",
            "description": {
                "text": [
                    "Select an item in the entity selector's combobox by value (objectApiName). Should only be used in a multi-object lookup use-case."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "selectEntityInEntitySelector",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "name": "isEntitySelectorPresent",
            "description": {
                "text": [
                    "Determine if the entity selector is present in the DOM or not."
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "isEntitySelectorPresent",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "getBaseCombobox",
            "description": {
                "deprecated": "in Spring '24 release, use other lookup UTAM methods instead",
                "text": [
                    "Get the baseCombobox component."
                ],
                "return": "baseCombobox page object"
            },
            "compose": [
                {
                    "element": "desktop"
                },
                {
                    "chain": true,
                    "element": "groupedCombobox",
                    "returnType": "utam-lightning/pageObjects/groupedCombobox"
                },
                {
                    "chain": true,
                    "element": "baseCombobox",
                    "returnType": "utam-lightning/pageObjects/baseCombobox"
                }
            ]
        },
        {
            "name": "showDesktopAdvancedModal",
            "description": {
                "text": [
                    "Open the advanced modal when we are on a desktop form factor"
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "selectAdvancedLookupOption"
                }
            ]
        },
        {
            "name": "selectCreateNewAction",
            "description": {
                "text": [
                    "Request the creation of a new record"
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "selectCreateNewAction"
                }
            ]
        },
        {
            "name": "isCreateNewActionPresent",
            "description": {
                "text": [
                    "Ensure the create new action is present"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "isCreateNewActionPresent",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "getErrorMessage",
            "description": {
                "text": [
                    "Get the error message displayed"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "getErrorMessage",
                    "returnType": "string"
                }
            ]
        },
        {
            "name": "clearInput",
            "description": {
                "text": [
                    "Clear the input text into the combobox input."
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "clearInput"
                }
            ]
        },
        {
            "name": "waitForSuggestions",
            "description": {
                "text": [
                    "Wait until suggestions are loaded"
                ],
                "return": "none"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "waitForSuggestions"
                }
            ]
        },
        {
            "name": "isDisabled",
            "description": {
                "text": [
                    "Determine if the component is disabled"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "isDisabled",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "isEnabled",
            "description": {
                "text": [
                    "Determine if the component is enabled"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "isEnabled",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "isRequired",
            "description": {
                "text": [
                    "Determine if the component is required"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "isRequired",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "waitUntilReady",
            "description": {
                "text": [
                    "Waits for the lookup component to be ready"
                ]
            },
            "compose": [
                {
                    "element": "desktop",
                    "apply": "waitUntilReady"
                }
            ]
        }
    ],
    "shadow": {
        "elements": [
            {
                "name": "lookupDesktop",
                "public": true,
                "type": "utam-lightning/pageObjects/lookupDesktop",
                "selector": {
                    "css": "lightning-lookup-desktop"
                },
                "description": {
                    "text": [
                        "DO NOT USE - use provided methods instead"
                    ],
                    "deprecated": "Accessing a child component breaks the abstraction provided by the Page Object model. This selector will no longer be accessible in near future, please use the component's public methods instead."
                }
            },
            {
                "name": "desktop",
                "public": false,
                "type": "utam-lightning/pageObjects/lookupDesktop",
                "selector": {
                    "css": "lightning-lookup-desktop"
                },
                "description": {
                    "text": [
                        "form factor LARGE implementation of Lookup"
                    ]
                }
            }
        ]
    }
}