from enum import Enum


class LocalizationPrompt(str, Enum):
    CLICK_PROMPT_NORMALIZED = """Using the screenshot, you will get an instruction and will need to output a click that completes the instruction or targets the given element.
FYI, the screenshot resolution is {resolution}.

Just write your action as follows:

Action: click(0.XXX, 0.YYY)
With 0.XXX and 0.YYY the normalized coordinates of the click position on the screenshot, representing relative horizontal (X-axis) and vertical (Y-axis) positions on the screen respectively.

For example, this action would click towards the top left of the screen:
Action: click(0.254, 0.753)

Keep the answer concise and to the point. The action should be formatted as above.
When clicking an element, always click the center of the element.

Now write the click needed to complete the instruction:
Instruction: {instruction}
"""

    CLICK_PROMPT_ABSOLUTE = """Given the screenshot, and the instruction, output a click that completes the instruction or targets the given element (always target the center of the element).
FYI, the screenshot resolution is {resolution}.

Just output the click position as follows:

Action: click(x, y)
With x the number of pixels from the left edge and y the number of pixels from the top edge.

Now write the click needed to complete the instruction:
Instruction: {instruction}
"""

    CLICK_PROMPT_ABSOLUTE_UITARS = """Given the screenshot, and the instruction, output a click that completes the instruction or targets the given element (always target the center of the element).
FYI, the screenshot resolution is {resolution}.
Just output the click position as follows:
Action: click(point='<point>x y</point>')
With x the number of pixels from the left edge and y the number of pixels from the top edge.
Now write the click needed to complete the instruction:
Instruction: {instruction}
"""

    BOUNDING_BOX_PROMPT = """Given the screenshot of a GUI, localize the specific element described by my instruction and output a bounding box as Polygon:

boundingbox(0.XXX, 0.YYY, 0.XXX, 0.YYY)

where 0.XXX and 0.YYY are numbers between 0 and 1, representing relative horizontal (X-axis) and vertical (Y-axis) positions on the screen respectively.
Ensure the coordinates accurately represent the bounding box of the specified GUI element.

Instructions:
{instruction}

Output:
"""
