from __future__ import annotations

import re

from app.models.mix_calculator import MixCalculatorSession


def mix_calculator_pdf_filename(session_record: MixCalculatorSession) -> str:
    raw = f"{session_record.session_number}_{session_record.client_name}_{session_record.product_name}.pdf"
    return re.sub(r"[^\w.\-]+", "_", raw)
