WELCOME_1_TEXT = """
Hey there!

 \n{0}\n

Here is the verification code you requested.
Type code into the challenge input field.
"""

WELCOME_1_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>
<style>
  .otp-code {{
    font-size: 3em;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin: 1em 0;
  }}
</style>
</head>
  <body>
    <h1 class="otp-code">{1}</h1>

    <p>Hey there!</p>

    <p>
    Here is the verification code you requested.
    Type code into the challenge input field.
    </p>

  </body>
</html>
"""

PURCHASE_1_TEXT = """
You made a purchase!

{0}

You may paste this link into your browser to view and download your purchases:

 \n{1}\n

Thank you very much!
"""

# 0: subject,
# 1: request.host_url,
# 2: product_text,
# 3: total_cost,

PURCHASE_1_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>

</head>
  <body>
    <h2>
    You made a purchase!
    </h2>

    {2}

    <b>${3}</b>

    <p>
    You may <a href="{1}/u/purchases" style="font-weight: bold;" target="_blank">download your purchases</a> at any time.
    </p>

    <p>
    </p>

    <p style="font-size: .8em;">
    <span style="color: #aaaaaa;">
    You may paste this link into your browser to view or download your purchases:
    </span>
    <br>
    <br>
    <a href="{1}/u/purchases" style="color: #439fe0; font-weight: normal; text-decoration: none; word-break: break-word;" target="_blank">
    {1}/u/purchases
    </a>
    </p>

    <p>
    Thank you very much!
    </p>

  </body>
</html>
"""

SALE_1_TEXT = """
You made a sale!

{0}

You may paste this link into your browser to view your sales:

 \n{1}\n

Great job!
"""

# 0: subject,
# 1: shop.absolute_sales_url
# 2: product_text,
# 3: total_cost,

SALE_1_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>

</head>
  <body>
    <h2>
    You made a <u>sale</u>!
    </h2>

    <b>${3}</b>

    {2}

    <p>
    You may view <a href="{1}" style="font-weight: bold;" target="_blank">all your sales</a> at any time.
    </p>

    <p style="font-size: .8em;">
    <span style="color: #aaaaaa;">
    You may paste this link into your browser to view your sales:
    </span>
    <br>
    <br>
    <a href="{1}" style="color: #439fe0; font-weight: normal; text-decoration: none; word-break: break-word;" target="_blank">
    {1}
    </a>
    </p>

    <p>
    Great job!
    </p>

  </body>
</html>
"""


# 0: user.email
# 1: shop.name,
# 2: log in link.
INVITE_1_TEXT = """
Hey There!

{0} has invited you to join the {1} shop on Make Post Sell.

Click this link to log in.

{2}

Make Post Sell is a lightweight, open-source, public domain, software as a service ecommerce web application.
We hope you like our ethical approach to doing business online.

Thanks for sharing! <3
"""

# 0: subject,
# 1: user.email
# 2: shop.name,
# 3: log in link.

INVITE_1_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>

</head>
<body>

<h2>Hey There!</h2>

<p>
{1} has invited you to join {2} on Make Post Sell.
</p>

<p>
<a href="{3}">click this link to log in to the shop.</a>
</p>

<p>
Make Post Sell is a lightweight, open-source, public domain, software as a service ecommerce web application.
We hope you like our ethical approach to doing business online.
</p>

<p>
Thanks for sharing! <3
</p>

  </body>
</html>

"""


# 0: shop_name,
# 1: verify_url,
# 2: unsubscribe_url

VERIFY_SUBSCRIPTION_TEXT = """
You requested to subscribe to email digests from {0}.

Please verify your email by visiting this link:

{1}

If you did not request this, you can ignore this email or unsubscribe:

{2}
"""

# 0: subject,
# 1: shop_name,
# 2: verify_url,
# 3: unsubscribe_url

VERIFY_SUBSCRIPTION_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>
</head>
<body>

<h2>Verify Your Subscription</h2>

<p>
You requested to subscribe to email digests from <b>{1}</b>.
</p>

<p>
<a href="{2}" style="font-weight: bold;">Click here to verify your email</a>
</p>

<p style="font-size: .8em; color: #aaaaaa;">
If you did not request this, you can ignore this email or
<a href="{3}">unsubscribe</a>.
</p>

</body>
</html>
"""


# 0: shop_name,
# 1: items_text,
# 2: unsubscribe_url

DIGEST_TEXT = """
New from {0}:

{1}

To unsubscribe from these digests:
{2}
"""

# 0: subject,
# 1: shop_name,
# 2: items_html,
# 3: unsubscribe_url

DIGEST_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>
</head>
<body>

<h2>New from {1}</h2>

{2}

<p style="font-size: .8em; color: #aaaaaa;">
<a href="{3}">Unsubscribe</a> from these digests.
</p>

</body>
</html>
"""


# 0: commenter_name,
# 1: product_title,
# 2: comment_text,
# 3: product_url

MENTION_TEXT = """
{0} mentioned you in a comment on "{1}":

{2}

View the comment:
{3}
"""

# 0: subject,
# 1: commenter_name,
# 2: product_title,
# 3: comment_text,
# 4: product_url

MENTION_HTML = """
<!DOCTYPE html>
<html>
<head>
<title>{0}</title>
</head>
<body>

<h2>You were mentioned in a comment</h2>

<p>
<b>{1}</b> mentioned you in a comment on "<b>{2}</b>":
</p>

<blockquote style="border-left: 3px solid #ccc; padding-left: 10px; color: #555;">
{3}
</blockquote>

<p>
<a href="{4}" style="font-weight: bold;">View the comment</a>
</p>

</body>
</html>
"""


# ── Auction & offer notifications (MPS-20 + MPS-21) ──────────────────────────

AUCTION_OUTBID_TEXT = """
You have been outbid on "{title}".

Current high: ${high}.
Place a new bid to stay in the game:

{auction_url}
"""

AUCTION_OUTBID_HTML = """
<!DOCTYPE html>
<html>
<body>
<h2>You have been outbid</h2>
<p>Someone outbid you on <strong>{title}</strong>.</p>
<p>Current high: <strong>${high}</strong>.</p>
<p><a href="{auction_url}" style="font-weight: bold;">Place a new bid</a></p>
</body>
</html>
"""


OFFER_RECEIVED_TEXT = """
You received a new offer of ${amount} for "{title}".

Review and respond:

{offer_url}
"""

OFFER_RECEIVED_HTML = """
<!DOCTYPE html>
<html>
<body>
<h2>New offer received</h2>
<p>You received a new offer of <strong>${amount}</strong> for <strong>{title}</strong>.</p>
<p><a href="{offer_url}" style="font-weight: bold;">View offer</a></p>
</body>
</html>
"""


OFFER_ACCEPTED_TEXT = """
Your offer of ${amount} for "{title}" was accepted.

Pay now to complete the purchase:

{offer_url}
"""

OFFER_ACCEPTED_HTML = """
<!DOCTYPE html>
<html>
<body>
<h2>Offer accepted</h2>
<p>Your offer of <strong>${amount}</strong> for <strong>{title}</strong> was accepted.</p>
<p><a href="{offer_url}" style="font-weight: bold;">Pay now</a></p>
</body>
</html>
"""
