"""Command handlers for Phase 11.10 AI content hooks."""
from app.services.ai_hooks import ExperienceAiHooksService


class AiHooksCommands:
    def __init__(self, session):
        self.service = ExperienceAiHooksService(session)

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

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

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

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

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

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

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