{
    "description": {
        "author": "Salesforce",
        "text": [
            "Selector: lightning-datepicker",
            "Represents the lightning-datepicker Lightning web component.",
            " Get the label text, or the date value as a string. Check if it's a required field. Clear the date field and set the date."
        ]
    },
    "type": [
        "clickable"
    ],
    "exposeRootElement": true,
    "shadow": {
        "elements": [
            {
                "name": "label",
                "selector": {
                    "css": "label"
                },
                "elements": [
                    {
                        "name": "required",
                        "selector": {
                            "css": ".slds-required"
                        },
                        "nullable": true
                    }
                ]
            },
            {
                "name": "helptext",
                "type": "utam-lightning/pageObjects/helptext",
                "selector": {
                    "css": "lightning-helptext"
                },
                "public": true
            },
            {
                "name": "dateInput",
                "type": [
                    "editable",
                    "actionable",
                    "clickable"
                ],
                "selector": {
                    "css": "input"
                }
            },
            {
                "name": "openButton",
                "type": "utam-lightning/pageObjects/buttonIcon",
                "selector": {
                    "css": "lightning-button-icon"
                },
                "public": true
            },
            {
                "name": "calendar",
                "type": "utam-lightning/pageObjects/calendar",
                "selector": {
                    "css": "lightning-calendar"
                },
                "public": true
            },
            {
                "name": "error",
                "selector": {
                    "css": ".slds-form-element__help"
                },
                "public": true,
                "nullable": true
            },
            {
                "name": "assistiveText",
                "selector": {
                    "css": ".slds-assistive-text"
                },
                "public": true,
                "nullable": true
            },
            {
                "name": "dateFormat",
                "selector": {
                    "css": "div[data-date-format]"
                },
                "nullable": true
            }
        ]
    },
    "methods": [
        {
            "name": "hasFocus",
            "description": {
                "text": [
                    "Checks if the lightning-datepicker has focus"
                ],
                "return": "boolean"
            },
            "compose": [
                {
                    "element": "root",
                    "apply": "isFocused"
                }
            ]
        },
        {
            "name": "focus",
            "description": "Applies focus on the input element",
            "compose": [
                {
                    "element": "dateInput",
                    "apply": "focus"
                }
            ]
        },
        {
            "name": "click",
            "description": "Click lightning-datepicker element",
            "compose": [
                {
                    "element": "root",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "getErrorText",
            "description": {
                "text": [
                    "Get error help text if present"
                ],
                "return": "string|null"
            },
            "compose": [
                {
                    "element": "error",
                    "apply": "getText"
                }
            ]
        },
        {
            "name": "getErrorAssistiveText",
            "description": {
                "text": [
                    "Get assistive help message text"
                ],
                "return": "string|null"
            },
            "compose": [
                {
                    "element": "assistiveText",
                    "apply": "getText"
                }
            ]
        },
        {
            "name": "getDateFormatTextContent",
            "description": {
                "text": [
                    "Get format text content if present"
                ],
                "return": "string|null"
            },
            "compose": [
                {
                    "element": "dateFormat",
                    "apply": "getText"
                }
            ]
        },
        {
            "name": "getDateFormatClassAttr",
            "description": {
                "text": [
                    "Gets the class list of date format div"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "apply": "getAttribute",
                    "element": "dateFormat",
                    "args": [
                        {
                            "value": "class"
                        }
                    ]
                }
            ]
        },
        {
            "name": "getInputAttribute",
            "description": {
                "text": [
                    "Get date input attribute value by param"
                ],
                "return": "string"
            },
            "compose": [
                {
                    "element": "dateInput",
                    "apply": "getAttribute",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Get the label text"
                ],
                "return": "String value, label text"
            },
            "name": "getLabelText",
            "compose": [
                {
                    "element": "label",
                    "apply": "getText"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Check if the field associated with the label is required"
                ],
                "return": "boolean value"
            },
            "name": "isRequired",
            "compose": [
                {
                    "element": "label",
                    "apply": "containsElement",
                    "args": [
                        {
                            "type": "locator",
                            "value": {
                                "css": ".slds-required"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Set the text for the date input text box"
                ],
                "return": "none"
            },
            "name": "setDateText",
            "compose": [
                {
                    "element": "dateInput",
                    "apply": "setText",
                    "args": [
                        {
                            "name": "text",
                            "type": "string"
                        }
                    ]
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Get the value of the date text box"
                ],
                "return": "String value"
            },
            "name": "getDateText",
            "compose": [
                {
                    "element": "dateInput",
                    "apply": "getValue"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Clear the value of the date text box"
                ],
                "return": "none"
            },
            "name": "clearDateText",
            "compose": [
                {
                    "element": "dateInput",
                    "apply": "clear"
                }
            ]
        }
    ]
}