"""A small, invented help centre for a made-up online shop, "Parcelo".

The text is fictional. The point of the lab is the method (check retrieval
before you blame the model), not the numbers it prints for this corpus.
"""

DOCS = [
    {
        "id": "returns",
        "title": "Returns and refunds",
        "text": """\
## Standard returns
You can return most items within 30 days of delivery. Items must be unused and in their original packaging. Start a return from the Orders page and print the prepaid label. Refunds go back to the original payment method within 5 to 7 business days after we receive the parcel.

## Items that cannot be returned
Gift cards, perishable food and personalised items cannot be returned. If a personalised item arrives damaged, contact support within 7 days and we will send a replacement instead.

## Membership fees
Parcelo Plus membership fees are refundable only within 14 days of purchase, and only if you have not used free delivery. After 14 days the fee is not refundable, but you can cancel at any time to stop the next renewal.""",
    },
    {
        "id": "shipping",
        "title": "Delivery times and costs",
        "text": """\
## Standard delivery
Standard delivery takes 3 to 5 working days. Orders placed before 2 pm on a working day are dispatched the same day. Standard delivery costs 4.99, and is free on orders over 40.

## Express delivery
Express delivery arrives the next working day for orders placed before 2 pm. It costs 8.99. Parcelo Plus members get express delivery free on orders over 20.

## Remote areas
Some islands and remote postcodes take 2 to 3 extra working days. You will see the estimated date at checkout before you pay.""",
    },
    {
        "id": "tracking",
        "title": "Tracking your order",
        "text": """\
## Find your tracking link
Open the Orders page and select the order. The tracking link appears once the courier scans the parcel, usually within 24 hours of dispatch. We also email the link to the address on your account.

## Tracking has not updated
Couriers sometimes skip scans between depots. If the tracking page shows no update for 3 working days, the parcel is probably still moving. Wait until the estimated delivery date has passed before contacting us.""",
    },
    {
        "id": "lost",
        "title": "Late or lost parcels",
        "text": """\
## When a parcel is late
If your parcel has not arrived 2 working days after the estimated delivery date, open the order and choose Report a problem. We open an investigation with the courier straight away.

## When a parcel is declared lost
A parcel is declared lost 7 working days after the estimated delivery date. At that point we send a replacement or refund the order in full, whichever you choose. You do not need to return anything.""",
    },
    {
        "id": "address",
        "title": "Changing a delivery address",
        "text": """\
## Before dispatch
You can change the delivery address from the Orders page until the order is dispatched. The Change address button disappears once dispatch starts.

## After dispatch
Once an order has been dispatched we cannot change the address. Ask the courier to redirect the parcel using the tracking number, or refuse delivery and we will refund the order when the parcel returns to us.""",
    },
    {
        "id": "errors",
        "title": "Checkout error codes",
        "text": """\
Checkout shows a short code when a payment cannot be completed. The most common ones are listed here.

E-4011: The card number or expiry date was entered incorrectly. Check the details and try again.
E-4012: The card was declined by the issuing bank. Try another card or contact your bank.
E-4013: The billing address does not match the address your bank holds. Update the billing address and retry.
E-4021: The card does not support online payments. Enable online payments in your banking app.
E-5001: Our payment provider did not respond. Wait a few minutes and retry. Your card has not been charged.
E-5002: The payment was received but the order could not be created. Do not pay again. Contact support with the code.""",
    },
    {
        "id": "payment",
        "title": "Payment methods",
        "text": """\
## Cards and wallets
Parcelo accepts Visa, Mastercard and American Express, plus Apple Pay and Google Pay. Cards are charged when the order is dispatched, not when it is placed.

## Pay later
Pay in 3 is available on orders between 50 and 1,000. It is a credit product from a third party and is subject to approval. Parcelo does not see your credit check result.""",
    },
    {
        "id": "giftcards",
        "title": "Gift cards",
        "text": """\
## Using a gift card
Enter the 16-digit code at checkout. A gift card can be used on several orders until the balance reaches zero. Gift cards expire 24 months after purchase.

## Lost gift cards
If you lose a gift card, we can reissue it only when you can show the order number it was bought on. Reissued cards keep the original expiry date.""",
    },
    {
        "id": "membership",
        "title": "Parcelo Plus membership",
        "text": """\
## What you get
Parcelo Plus members get free standard delivery on every order, free express delivery on orders over 20, and early access to sales. The fee is 29 a year, billed on the day you join.

## Cancelling
Cancel any time from Account settings. Your benefits continue until the end of the paid year. Renewal is automatic unless you cancel at least 2 days before the renewal date.""",
    },
    {
        "id": "delete",
        "title": "Closing your account",
        "text": """\
## Delete your account
You can close your account from Account settings. Open orders must be delivered or cancelled first. Closing an account removes your saved addresses and payment tokens within 30 days.

## What we keep
Invoices and order records are kept for 7 years because tax law requires it. They are not used for marketing after you close the account.""",
    },
    {
        "id": "export",
        "title": "Downloading your data",
        "text": """\
## Request an export
Go to Account settings, then Privacy, then Download my data. We email a link within 48 hours. The file contains your profile, addresses and order history as CSV files.

## Link expiry
The download link works for 7 days and for one download only. Request a new export if it expires.""",
    },
    {
        "id": "support",
        "title": "Contacting support",
        "text": """\
## Opening hours
Chat support is open from 8 am to 8 pm, seven days a week. Email replies take up to 24 hours. There is no phone line.

## Faster help
Include your order number in the first message. Support can then see the order and the courier history without asking you for details.""",
    },
]

# (id, question, phrase that must appear in a retrieved chunk for the answer to be possible)
QUESTIONS = [
    ("q1", "Can I get my money back for the yearly Plus membership?", "refundable only within 14 days"),
    ("q2", "My parcel hasn't arrived and the date has passed. What now?", "report a problem"),
    ("q3", "When does a missing parcel count as lost?", "declared lost 7 working days"),
    ("q4", "What does error E-4013 mean?", "e-4013: the billing address"),
    ("q5", "Can I change my address after the order has shipped?", "cannot change the address"),
    ("q6", "How long do I have to use my gift card?", "expire 24 months after purchase"),
    ("q7", "Do you keep my invoices after I delete my account?", "kept for 7 years"),
    ("q8", "Is express delivery free for members?", "free on orders over 20"),
    ("q9", "How do I download everything you store about me?", "download my data"),
    ("q10", "I paid but got no order confirmation. What should I do?", "do not pay again"),
]
