from enum import Enum


class AndroidControlPrompt(str, Enum):
    INSTRUCTION_PROMPT = """Using the previous screenshots and actions as context, try to complete the following task:
Task: {task}

Previous screenshots and actions:
"""

    ASSISTANT_PROMPT_NORMALIZED_CLICK = """The action should be one of the following:
- click(0.XXX, 0.YYY)
- click(0.XXX, 0.YYY); type("content")
- scroll(direction) # direction can be "up", "down"
- open_app(app_name) # With app_name the name of the app to open, as a string, like open_app(\"runkeeper\")
- wait()

0.XXX and 0.YYY are the normalized coordinates of the click position on the screenshot.
Keep the answer concise and to the point. The action should be formatted as above.

What should be the next action to complete the task?
Action: """

    ASSISTANT_PROMPT_ABSOLUTE_CLICK = """The action should be one of the following:
- click(x, y)
- click(x, y); type("content")
- scroll(direction) # direction can be "up", "down"
- open_app(app_name) # With app_name the name of the app to open, as a string, like open_app(\"runkeeper\")
- wait()

In click(x, y), x is the number of pixels from the left edge and y the number of pixels from the top edge.
FYI, the screenshot resolution is {resolution}.
Keep the answer concise and to the point. The action should be formatted as above.

What should be the next action to complete the task?
Action: """

    ASSISTANT_PROMPT_ABSOLUTE_CLICK_UITARS = """The action should be one of the following:
- click(point='<point>x y</point>')
- click(point='<point>x y</point>'); type(content='xxx'); # Use escape characters \\', \\\", and \\n in content part to ensure we can parse the content in normal python string format. If you want to submit your input, use \\n at the end of content.
- scroll(direction) # direction can be "up", "down"
- open_app(app_name) # With app_name the name of the app to open, as a string, like open_app(\"runkeeper\")
- wait()


In click(point='<point>x y</point>'), x is the number of pixels from the left edge and y the number of pixels from the top edge.
FYI, the screenshot resolution is {resolution}.
Keep the answer concise and to the point. The action should be formatted as above.

What should be the next action to complete the task?
Action: """
