import os
from pathlib import Path


class Paths:
    @classmethod
    def resource(cls, *parts):
        base = Path(__file__).parent.parent / "res"
        return base.joinpath(*parts)

    @classmethod
    def sound_path(cls, filename, ui_mode):
        if ui_mode == "sonic":
            return cls.resource(f"sonic/sounds/{filename}")
        return cls.resource(filename)


def get_settings():
    from PyQt6.QtCore import QSettings

    return QSettings("gasket", "gasket")
