package com.example.dateplanner.controllers.web;

import ch.qos.logback.core.model.Model;
import com.example.dateplanner.models.entities.AppUser;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.reactive.result.view.Rendering;
import reactor.core.publisher.Mono;
import java.util.HashMap;
import java.util.Map;

@Slf4j
@Controller
@RequiredArgsConstructor
@RequestMapping("/account")
public class AccountController {

    @GetMapping("/profile")
    public Mono<Rendering> profile() {
        Map<String, Object> model = new HashMap<>();
        model.put("title", "Profile");
        model.put("index", "profile");
        return Mono.just(
                Rendering.view("template")
                        .model(model)
                        .build()
        );
    }
}
