"""
Advanced Markdown delimiters for Telethon

Importing this module activates additional delimiters globally
using Telethon's supported DEFAULT_DELIMITERS mechanism.

These delimiters are OPTIONAL sugar on top of:
- native markdown
- universal URL-based markdown


📦 Delimiters advanced add-ons for Telethon
👤 Created by Ankit Chaubey | https://github.com/ankit-chaubey/delimiters
© 2026 Ankit Chaubey. All rights reserved.
📬 Contact: m.ankitchaubey@gmail.com | Telegram: @ankify @AnkitChaubey @ChaubeyBot
⚠️ Warning: Do not edit this file unless you are absolutely sure what you are doing.
💥 Changing this file may break the package.
🚀 Initially built for personal use, now released publicly.
"""

from telethon.extensions import markdown
from telethon import types

# ===============================
# Inline formatting
# ===============================

# !!underline!!
markdown.DEFAULT_DELIMITERS["!!"] = types.MessageEntityUnderline

# ||spoiler||
markdown.DEFAULT_DELIMITERS["||"] = types.MessageEntitySpoiler


# ===============================
# Blockquote formatting
# ===============================

# %%collapsed blockquote%%
markdown.DEFAULT_DELIMITERS["%%"] = (
    lambda *a, **k: types.MessageEntityBlockquote(
        *a,
        **k,
        collapsed=True,
    )
)

# ^^expanded blockquote^^
markdown.DEFAULT_DELIMITERS["^^"] = (
    lambda *a, **k: types.MessageEntityBlockquote(
        *a,
        **k,
        collapsed=False,
    )
)

# Re-export markdown so users can do:
# from delimiters import markdown
__all__ = ["markdown"]
