"""Publishing, SEO and PWA query handlers — Phase 11.7."""
from __future__ import annotations

from uuid import UUID

from sqlalchemy.ext.asyncio import AsyncSession

from app.services.publishing import ExperiencePublishingService


class PublishingQueries:
    def __init__(self, session: AsyncSession) -> None:
        self.service = ExperiencePublishingService(session)

    async def get_publish_release(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_publish_release(tenant_id, entity_id)

    async def list_publish_releases(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_publish_releases(tenant_id, offset=offset, limit=limit, spec=spec)

    async def get_domain_edge_binding(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_domain_edge_binding(tenant_id, entity_id)

    async def list_domain_edge_bindings(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_domain_edge_bindings(tenant_id, offset=offset, limit=limit, spec=spec)

    async def get_seo(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_seo(tenant_id, entity_id)

    async def list_seo(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_seo(tenant_id, offset=offset, limit=limit, spec=spec)

    async def get_sitemap(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_sitemap(tenant_id, entity_id)

    async def list_sitemaps(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_sitemaps(tenant_id, offset=offset, limit=limit, spec=spec)

    async def get_robots(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_robots(tenant_id, entity_id)

    async def list_robots(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_robots(tenant_id, offset=offset, limit=limit, spec=spec)

    async def get_pwa(self, tenant_id: UUID, entity_id: UUID):
        return await self.service.get_pwa(tenant_id, entity_id)

    async def list_pwa(self, tenant_id: UUID, *, offset: int, limit: int, spec=None):
        return await self.service.list_pwa(tenant_id, offset=offset, limit=limit, spec=spec)
