"""Command handlers for Phase 11.8."""
from app.services.bundles import ExperienceBundlesService


class BundlesCommands:
    def __init__(self, session):
        self.service = ExperienceBundlesService(session)

    async def create_bundle_definition(self, tenant_id, body, *, actor=None):
        return await self.service.create_bundle_definition(tenant_id, body, actor=actor)

    async def update_bundle_definition(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_bundle_definition(tenant_id, entity_id, body, actor=actor)

    async def delete_bundle_definition(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_bundle_definition(tenant_id, entity_id, actor=actor)

    async def create_tenant_bundle(self, tenant_id, body, *, actor=None):
        return await self.service.create_tenant_bundle(tenant_id, body, actor=actor)

    async def update_tenant_bundle(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_tenant_bundle(tenant_id, entity_id, body, actor=actor)

    async def delete_tenant_bundle(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_tenant_bundle(tenant_id, entity_id, actor=actor)

    async def create_license_binding(self, tenant_id, body, *, actor=None):
        return await self.service.create_license_binding(tenant_id, body, actor=actor)

    async def update_license_binding(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_license_binding(tenant_id, entity_id, body, actor=actor)

    async def delete_license_binding(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_license_binding(tenant_id, entity_id, actor=actor)

    async def create_feature_toggle(self, tenant_id, body, *, actor=None):
        return await self.service.create_feature_toggle(tenant_id, body, actor=actor)

    async def update_feature_toggle(self, tenant_id, entity_id, body, *, actor=None):
        return await self.service.update_feature_toggle(tenant_id, entity_id, body, actor=actor)

    async def delete_feature_toggle(self, tenant_id, entity_id, *, actor=None):
        return await self.service.delete_feature_toggle(tenant_id, entity_id, actor=actor)
