from typing import Annotated, Any
from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from backend.core.config import get_app_settings
from backend.core.dependencies import is_logged_in
from backend.db.db_setup import generate_session
from backend.schemas.common import ReturnValue
from backend.schemas.house import HouseCreate
from backend.schemas.user import ProfileResponse
from backend.services.house import HouseService

public_router = APIRouter(tags=["Houses: Control"])
house_service = HouseService()
settings = get_app_settings()

db_dependency = Annotated[Session, Depends(generate_session)]
current_user_token = Annotated[ProfileResponse, Depends(is_logged_in)]

@public_router.get("/create", response_model=ReturnValue[Any])
def create_house(house: HouseCreate, db: db_dependency, current_user: current_user_token) -> ReturnValue[Any]:
  return ReturnValue(status=200, data="created")
