"""
Endpoints API para gestión de líneas de activos fijos (FA Item Lines)
"""

from typing import Any, Dict
from fastapi import Depends, Query
from sqlalchemy.orm import Session

from core.database import get_core_db
from core.security import get_current_user
from api.v1.common.tenant_crud_routes import (
    TenantCRUDRoutes,
    validate_access_to_resource,
)

from .dto import FaLineItemCreateDTO, FaLineItemResponseDTO, FaLineItemUpdateDTO
from .service import FaLineItemService

# Create router with generic CRUD routes
crud_routes = TenantCRUDRoutes(
    service=FaLineItemService,
    create_schema=FaLineItemCreateDTO,
    update_schema=FaLineItemUpdateDTO,
    response_schema=FaLineItemResponseDTO,
    prefix="/fa/item-lines",
    tags=["a24 / fa / item-lines"],
    resource_name="Fixed Asset Line Item",
    id_name="fa_line_item_id",
    enable_list=True,
    enable_filters=True,
    default_page_size=50,
    max_page_size=100,
)

router = crud_routes.router
