from redbot.core import Config

config: Config = Config.get_conf(None, identifier=294518358420750336, cog_name="IssueCards", force_registration=True)


def register_config(config_obj: Config) -> None:
    """Register the cog configuration with the given config object.

    Provider structure:
        {
            "id": "unique identifier for the provider",
            "url": "url + scheme to access the provider",
            "service": "service type of the provider (e.g., `github`, `gitlab`, `forgejo`)",
            "token": "api token for the provider, not required (unauthenticated requests will be used instead if this is not provided)",
        }

    Repository structure:
        {
            "owner": "owner of the repository",
            "name": "name of the repository",
            "provider": "provider ID that contains this repository. requires a provider to exist with the same ID",
            "prefix": "prefix used for determining which repository to retrieve an issue from when using the `#<issue-num>` syntax"
        }
    """
    config_obj.register_global(
        global_providers=[{"id": "github", "url": "https://github.com", "service": "github", "token": None}, {"id": "gitlab", "url": "https://gitlab.com", "service": "gitlab", "token": None}],
        global_repositories=[],  # {"owner": "Cog-Creators","repository": "Red-DiscordBot", "provider": "github", "prefix": "red"}
    )
    config_obj.register_guild(
        providers=[],
        repositories=[],
    )