"""Browser profile detection utilities."""

from pathlib import Path
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..browser_profiles import BrowserProfile

from ..browser_profiles import _detect_chromium_family


def detect_chrome_profiles() -> list["BrowserProfile"]:
    """Detect Google Chrome profiles by parsing Local State."""
    return _detect_chromium_family(
        base_dir=Path.home() / ".config" / "google-chrome",
        browser="chrome",
    )


def detect_chromium_profiles() -> list["BrowserProfile"]:
    """Detect Chromium profiles by parsing Local State."""
    return _detect_chromium_family(
        base_dir=Path.home() / ".config" / "chromium",
        browser="chromium",
    )
