"""Embedded FoodSpec logo utilities.

Provides access to a small PNG of the FoodSpec logo for GUI/reporting use cases
without needing to ship an external asset path. The image is base64-encoded
below; helper functions decode to bytes or save to disk.
"""

from __future__ import annotations

import base64
from pathlib import Path

# Base64 encoding of docs/assets/foodspec_logo.png (header logo version)
LOGO_BASE64: str = (
    "iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAADWjWNhQlgAANaNanVtYgAAAB5qdW1kYzJwYQARABCA"
    "AACqADibcQNjMnBhAAAANvpqdW1iAAAAR2p1bWRjMm1hABEAEIAAAKoAOJtxA3VybjpjMnBhOjc5YzEwMWU1LTA"
    "4YWUtNDg5Yi04YmVhLTA2ODFiNzBlMDkzZQAAAAHBanVtYgAAAClqdW1kYzJhcwARABCAAACqADibcQNjMnBhLm"
    "Fzc2VydGlvbnMAAAAA5Wp1bWIAAAApanVtZGNib3IAEQAQgAAAqgA4m3EDYzJwYS5hY3Rpb25zLnYyAAAAALRjY"
    "m9yoWdhY3Rpb25zgqNmYWN0aW9ubGMycGEuY3JlYXRlZG1zb2Z0d2FyZUFnZW50v2RuYW1lZkdQVC00b/9xZGlna"
    "XRhbFNvdXJjZVR5cGV4Rmh0dHA6Ly9jdi5pcHRjLm9yZy9uZXdzY29kZXMvZGlnaXRhbHNvdXJjZXR5cGUvdHJha"
    "W5lZEFsZ29yaXRobWljTWVkaWGhZmFjdGlvbm5jMnBhLmNvbnZlcnRlZAAAAKtqdW1iAAAAKGp1bWRjYm9yABEA"
    "EIAAAKoAOJtxA2MycGEuaGFzaC5kYXRhAAAAAHtjYm9ypWpleGNsdXNpb25zgaJlc3RhcnQYIWZsZW5ndGgZNyxkb"
    "mFtZW5qdW1iZiBtYW5pZmVzdGNhbGdmc2hhMjU2ZGhhc2hYIM0YcTy2Mre1Fw4vaTDM4XMUY1bpfhHl06GnucZjF"
    "e1hY3BhZEgAAAAAAAAAAAAAAe1qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGE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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
)


def get_logo_bytes() -> bytes:
    """Return the logo PNG bytes decoded from the embedded base64 string."""

    return base64.b64decode(LOGO_BASE64)


def get_logo_base64() -> str:
    """Return the base64-encoded logo PNG string."""

    return LOGO_BASE64


def save_logo(path: str | Path) -> Path:
    """Save the embedded logo to a file and return the path."""

    out = Path(path)
    out.write_bytes(get_logo_bytes())
    return out


__all__ = ["LOGO_BASE64", "get_logo_bytes", "get_logo_base64", "save_logo"]
