from .grpc_lib.course_lesson_pb2 import (
    AddCommentRequest,
    CategoryRetrieveRequest,
    ConsultantRequest,
    CourseListRequest,
    CourseRetrieveCommentsRequest,
    CourseRetrieveRatesRequest,
    CourseRetrieveRequest,
    GeneralRetrieveRequest,
    LessonListRequest,
    LessonRetrieveRequest,
    PackageListRequest,
    PackageRetrieveRequest,
    RateRequest,
    TriggerLikeRequest,
)
from .grpc_lib.course_lesson_pb2_grpc import (
    CategoryControllerStub,
    ConsultantControllerStub,
    CourseControllerStub,
    GeneralControllerStub,
    LessonControllerStub,
    MasterCourseControllerStub,
    PackageControllerStub,
    TopBannerControllerStub,
)

SUCCESS_CODE = "0"


class RequestMessages:
    CREATE_CONSULTANT_REQUEST = ConsultantRequest()
    COMMENT = AddCommentRequest()
    RATE = RateRequest()
    LIKE = TriggerLikeRequest()
    UNLIKE = TriggerLikeRequest()
    FETCH_ALL_COURSE = CourseListRequest()
    FETCH_COURSE = CourseRetrieveRequest()
    FETCH_ALL_LESSON = LessonListRequest()
    FETCH_LESSON = LessonRetrieveRequest()
    FETCH_ALL_PACKAGE = PackageListRequest()
    FETCH_PACKAGE = PackageRetrieveRequest()
    FETCH_ITEM = GeneralRetrieveRequest()
    FETCH_BULK_ITEM = GeneralRetrieveRequest
    FETCH_COURSE_RATES = CourseRetrieveRatesRequest()
    FETCH_COURSE_COMMENTS = CourseRetrieveCommentsRequest()
    FETCH_CATEGORY = CategoryRetrieveRequest()


class RPCMethodNames:
    COMMENT = "Comment"
    CREATE = "Create"
    RATE = "Rate"
    LIKE = "Like"
    UNLIKE = "UnLike"
    FETCH_ONE = "Retrieve"
    FETCH_CURRENT = "RetrieveCurrent"
    FETCH_COMMENTS = "RetrieveComments"
    FETCH_RATES = "RetrieveRates"
    FETCH_ALL = "List"
    HIERARCHICAL_FETCH_ALL = "HierarchicalList"


class ControllerStubs:
    COURSE = CourseControllerStub()
    CONSULTANT = ConsultantControllerStub()
    MASTER_COURSE = MasterCourseControllerStub()
    LESSON = LessonControllerStub()
    PAKCAGE = PackageControllerStub()
    CATEGORY = CategoryControllerStub()
    TOP_BANNER = TopBannerControllerStub()
    GENERAL = GeneralControllerStub()


class InvokerUnits:
    ACCOUNT_ASSET = "account_asset"
    CORE_BASKET = "core_basket"
    CORE_ASSET_MANAGEMENT = "core_asset_management"
    INVOICE_INQUIRY = "invoice_inquiry"
    GATEWAY_SITEMAP = "gateway_sitemap"
