CHAT_OVERVIEW_NEW_MESSAGE_BUTTON = '//android.widget.FrameLayout[@content-desc="New Message"]'
CHAT_OVERVIEW_NAV_MENU_BUTTON = '//android.widget.ImageView[@content-desc="Open navigation menu"]'
CHAT_OVERVIEW_SEARCH_BUTTON = '//android.widget.ImageButton[@content-desc="Search"]'

SEARCH_INPUT_FIELD = '//android.widget.EditText[@text="Search"]'
FIRST_SEARCH_HIT = '//androidx.recyclerview.widget.RecyclerView/android.view.ViewGroup[starts-with(lower-case(@text), lower-case("{conversation},"))]'

CHAT_STATE_CONVERSATION_NAME = '//android.widget.ImageView[@content-desc="Go back"]/../android.widget.FrameLayout[starts-with(lower-case(@content-desc),lower-case("{conversation}\n"))]/android.widget.TextView[starts-with(lower-case(@text), lower-case("{conversation}"))]'
CHAT_STATE_CALL_BUTTON = '//android.widget.ImageButton[@content-desc="Call"]'
CHAT_STATE_BACK_BUTTON = '//android.widget.ImageView[@content-desc="Go back"]'
CHAT_STATE_THREE_DOTS = '//android.widget.ImageButton[@content-desc="More options"]'
CHAT_STATE_GIF_BUTTON = '//android.widget.ImageView[@content-desc="Emoji, stickers, and GIFs"]'
CHAT_STATE_MESSAGE_TEXTBOX = '//android.widget.EditText[@text]'
CHAT_STATE_MEDIA_BUTTON = '//android.widget.ImageView[@content-desc="Attach media"]'
CHAT_STATE_RECORD_VIDEO_OR_AUDIO_MESSAGE = '//android.widget.FrameLayout[@content-desc="Record voice message" or @content-desc="Record video message"]'
CHAT_STATE_SEND_BUTTON = '//android.view.View[@content-desc="Send"]'
CHAT_STATE_STOP_LIVE_LOCATION_SHARING_BUTTON = '//android.widget.ImageView[@content-desc="Stop sharing live location"]'
CHAT_STATE_STOP_LIVE_LOCATION_CONFIRM_BUTTON = '//android.widget.TextView[@text="Stop"]'
CHAT_STATE_DELETE_AND_LEAVE_GROUP = '//android.widget.TextView[@text="Delete and Leave Group"]'
CHAT_STATE_DELETE_AND_LEAVE_GROUP_FOR_ALL = '//android.widget.CheckBox[@text="Delete the group for all members"]'
CHAT_STATE_DELETE_AND_LEAVE_GROUP_CONFIRM_BUTTON = '//android.widget.TextView[@text="Delete Group" or @text="Delete chat"]'

SEND_MEDIA_STATE_INSTANT_CAMERA_BUTTON = '//android.widget.FrameLayout[@content-desc="Instant camera"]/preceding-sibling::android.widget.FrameLayout[last()]'
SEND_MEDIA_STATE_GALLERY_BUTTON = '//android.widget.FrameLayout[@text="Gallery"]'
SEND_MEDIA_STATE_FILE_BUTTON = '//android.widget.FrameLayout[@text="File"]'
SEND_MEDIA_STATE_LOCATION_BUTTON = '//android.widget.FrameLayout[@text="Location"]'

SEND_MEDIA_STATE_SEND_CURRENT_LOCATION_BUTTON = '//android.widget.TextView[@text="Send selected location"]'
SEND_MEDIA_STATE_MY_LOCATION_BUTTON = '//android.widget.ImageView[@content-desc="My location"]'
SEND_MEDIA_STATE_LIVE_LOCATION_BUTTON = '//android.widget.TextView[@text="Share My Live Location for..."]'
SEND_MEDIA_STATE_LIVE_LOCATION_DURATION_OPTION_INDEX = '(//android.widget.RadioButton/android.widget.TextView[@text])[{duration}]'
SEND_MEDIA_STATE_LIVE_LOCATION_DURATION_OPTION_TEXT = '//android.widget.RadioButton/android.widget.TextView[contains(lower-case(@text), lower-case("{duration}"))]'
SEND_MEDIA_STATE_LIVE_LOCATION_SHARE_BUTTON = '//android.widget.TextView[@text="Share"]'

SEND_FROM_GALLERY_STATE_BACK_BUTTON = '//android.widget.ImageView[@content-desc="Go back"]'
SEND_FROM_GALLERY_THREE_DOTS_BUTTON = '//android.widget.ImageButton[@content-desc="More options"]'
SEND_FROM_GALLERY_FOLDER_PICKER = '//android.widget.ImageView[@content-desc="Go back"]/following-sibling::*[1][@text]'
SEND_FROM_GALLERY_MEDIA_SWITCH = '(//android.widget.Switch)[{index}]'

CALL_STATE_END_CALL_BUTTON = '//android.widget.Button[@text="End Call"]'
CALL_STATE_SPEAKER_BUTTON = '//android.widget.FrameLayout[@content-desc="Speaker"]'
CALL_STATE_MUTE_BUTTON = '//android.widget.FrameLayout[@content-desc="Mute" or @content-desc="Unmute"]'
CALL_STATE_STATUS = '//android.widget.LinearLayout[ends-with(@text, "Telegram Call")]/android.widget.FrameLayout/android.widget.TextView'

NEW_MESSAGE_STATE_NEW_GROUP_BUTTON = '//android.widget.FrameLayout[@text="New Group"]'
NEW_MESSAGE_STATE_NEW_CONTACT_BUTTON = '//android.widget.FrameLayout[@text="New Contact"]'
NEW_MESSAGE_STATE_NEW_CHANNEL_BUTTON = '//android.widget.FrameLayout[@text="New Channel"]'
NEW_MESSAGE_STATE_CREATE_NEW_CONTACT_BUTTON = '//android.widget.FrameLayout[@content-desc="Create New Contact"]'

NEW_GROUP_MEMBER = '//android.widget.FrameLayout/android.widget.TextView[lower-case(@text)=lower-case("{member}")]'
NEW_GROUP_NEXT = '//android.widget.ImageView[@content-desc="Next"]'
NEW_GROUP_NAME_INPUT = '//android.widget.EditText'
NEW_GROUP_AUTO_DELETE_OPTION = '//android.widget.TextView[@text="Auto-Delete Messages"]'
NEW_GROUP_DONE_BUTTON = '//android.widget.FrameLayout[@content-desc="Done"]'

CHAT_SETTINGS_STATE_BACK = '//android.widget.ImageView[@content-desc="Go back"]'
CHAT_SETTINGS_STATE_THREE_DOTS = '//android.widget.ImageButton[@content-desc="More options"]'
CHAT_SETTINGS_STATE_CONVERSATION_NAME = '(//android.widget.TextView[@text and @text!=""])[2]'
CHAT_SETTINGS_STATE_CONVERSATION_NAME_CONTEXT = '(//android.widget.TextView[lower-case(@text)=lower-case("{conversation}")])[2]'
CHAT_SETTINGS_STATE_CONVERSATION_STATUS_CONTEXT = '(//android.widget.TextView[lower-case(@text)=lower-case("{conversation}")])[2]/following-sibling::*[1][@text and @text!=""]'
# group settings
CHAT_SETTINGS_EDIT_GROUP_BUTTON = '//android.widget.ImageButton[@content-desc="Edit"]'
CHAT_SETTINGS_STATE_ADD_MEMBERS = '//android.widget.TextView[@text="Add Members"]'
CHAT_SETTINGS_STATE_ADD_MEMBERS_SEARCH = '//android.widget.EditText[@text]'
CHAT_SETTINGS_STATE_MEMBER_CONTEXT = '//androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout[android.view.View and count(android.widget.TextView) >= 2 and android.widget.TextView[lower-case(@text)=lower-case("{member}")]]'
CHAT_SETTINGS_STATE_REMOVE_MEMBER_BUTTON = '//android.widget.TextView[@text="Remove from group"]'

EDIT_GROUP_NAME= '//android.widget.EditText[1]'
EDIT_GROUP_DESCRIPTION= '//android.widget.EditText[2]'
EDIT_GROUP_DONE= '//android.widget.ImageButton[@content-desc="Done"]'
