package com.ecep.contract.controller.bank;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.ecep.contract.controller.AbstManagerWindowController;
import com.ecep.contract.model.Bank;
import com.ecep.contract.service.BankService;
import com.ecep.contract.util.FxmlPath;
import com.ecep.contract.vm.BankViewModel;

import javafx.event.ActionEvent;
import javafx.scene.control.TableColumn;

@Lazy
@Scope("prototype")
@Component
@FxmlPath("/ui/bank-manager.fxml")
public class BankManagerWindowController
        extends AbstManagerWindowController<Bank, BankViewModel, BankManagerSkin> {

    @Autowired
    private BankService bankService;

    public TableColumn<BankViewModel, Number> idColumn;
    public TableColumn<BankViewModel, String> nameColumn;
    public TableColumn<BankViewModel, String> codeColumn;

    @Override
    protected BankManagerSkin createDefaultSkin() {
        return new BankManagerSkin(this);
    }

    public void onCreateNewAction(ActionEvent event) {

    }

    public void onReBuildFilesAction(ActionEvent event) {
    }

    @Override
    public BankService getViewModelService() {
        return bankService;
    }
}
