"""
Routes for PedimentoRectificationDestination CRUD operations
"""

from api.v1.common.tenant_crud_routes import TenantCRUDRoutes

from ..dtos.pedimento_rectification_destination import (
    PedimentoRectificationDestinationCreate,
    PedimentoRectificationDestinationResponse,
    PedimentoRectificationDestinationUpdate,
)
from ..services.pedimento_rectification_destination import (
    PedimentoRectificationDestinationService,
)

# Create router with generic CRUD routes for child resource
router = TenantCRUDRoutes(
    service=PedimentoRectificationDestinationService,
    create_schema=PedimentoRectificationDestinationCreate,
    update_schema=PedimentoRectificationDestinationUpdate,
    response_schema=PedimentoRectificationDestinationResponse,
    prefix="/{pedimento_id}/rectification-destination",
    tags=[],
    resource_name="Rectification destination",
    parent_id_name="pedimento_id",
    enable_list=False,
    validate_parent_match=True,
    get_permissions=["pedimentos_mgmt.view"],
    create_permissions=["pedimentos_mgmt.edit"],
    update_permissions=["pedimentos_mgmt.edit"],
    delete_permissions=["pedimentos_mgmt.edit"],
).router
