package danielcortes.xyz.controllers;

import danielcortes.xyz.data.Configuration;
import danielcortes.xyz.views.MainSideBar;
import javax.swing.border.TitledBorder;

public class MainSideBarController {

  private MainSideBar view;

  public MainSideBarController(MainSideBar view) {
    this.view = view;
    this.loadRestaurantName();
  }

  public MainSideBar getView() {
    return view;
  }

  private void loadRestaurantName() {
    String nombre = Configuration.get("nombre_caja");
    ((TitledBorder) this.view.getButtonPanel().getBorder()).setTitle("Restaurant: " + nombre);
  }
}
