"""
Jira credentials loaded from .env file.
"""

from pathlib import Path
from pydantic_settings import BaseSettings

ENV_FILE = Path(__file__).parent.parent / ".env"


class JiraConfig(BaseSettings):
    jira_url: str
    jira_email: str | None = None  # Optional: can be provided per-request via headers
    jira_api_token: str | None = None  # Optional: can be provided per-request via headers
    api_port: int = 8001

    model_config = {
        "env_file": ENV_FILE,
        "env_file_encoding": "utf-8",
    }


settings = JiraConfig()
