# standard library
from enum import Enum


class Env(str, Enum):
    # openidBaseUrl, openidClient
    OPENID_BASE_URL = "OPENID_BASE_URL"
    # openidClient
    OPENID_CLIENT_ID = "OPENID_CLIENT_ID"
    OPENID_CLIENT_SECRET = "OPENID_CLIENT_SECRET"
    # redis
    REDIS_HOST = "REDIS_HOST"
    REDIS_USERNAME = "REDIS_USERNAME"
    REDIS_PASSWORD = "REDIS_PASSWORD"
    # minio
    MINIO_HOST = "MINIO_HOST"
    MINIO_ACCESS_KEY = "MINIO_ACCESS_KEY"
    MINIO_ACCESS_SECRET = "MINIO_ACCESS_SECRET"
    # keycloakAdmin
    KEYCLOAK_ADMIN_BASE_URL = "KEYCLOAK_ADMIN_BASE_URL"
    KEYCLOAK_ADMIN_CLIENT_ID = "KEYCLOAK_ADMIN_CLIENT_ID"
    KEYCLOAK_ADMIN_CLIENT_SECRET = "KEYCLOAK_ADMIN_CLIENT_SECRET"


OPENID_BASE_URL = [Env.OPENID_BASE_URL]
OPENID_CLIENT = OPENID_BASE_URL + [Env.OPENID_CLIENT_ID, Env.OPENID_CLIENT_SECRET]
REDIS = [Env.REDIS_HOST, Env.REDIS_USERNAME, Env.REDIS_PASSWORD]
MINIO = [Env.MINIO_HOST, Env.MINIO_ACCESS_KEY, Env.MINIO_ACCESS_SECRET]
KEYCLOAK_ADMIN = [
    Env.KEYCLOAK_ADMIN_BASE_URL,
    Env.KEYCLOAK_ADMIN_CLIENT_ID,
    Env.KEYCLOAK_ADMIN_CLIENT_SECRET,
]

MINIO_PORT = 9000


def minio_endpoint(minio_host: str, minio_port: int = MINIO_PORT) -> str:
    return f"{minio_host}:{minio_port}"
