package com.printhub.printhub.controller.configuration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Locale;

@Controller
@RequestMapping("/configuration/printers")
public class PrintersController {

    @Autowired
    private MessageSource messageSource;

    @GetMapping
    public String index(Model model, Locale locale) {
        model.addAttribute("title", messageSource.getMessage("t-printers", null, locale));
        return "printhub/configuration/printers";
    }
}
