package de.jg_cody.Teraplex.ui.rooms;

import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class ViewHolderDoubleButton implements IViewHolder{
    String command;
    Button bLeft, bRight;

    public ViewHolderDoubleButton(Button bLeft, Button bRight, String command) {
        this.bLeft = bLeft;
        this.bRight = bRight;
        this.command = command;

        bLeft.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(bLeft.getContext(),command + " ON",Toast.LENGTH_SHORT).show();
            }
        });
        bRight.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(bRight.getContext(),command + " ON",Toast.LENGTH_SHORT).show();
            }
        });


    }
    @Override
    public String getCommand() {
        return command;
    }
    public Button getbLeft() {
        return bLeft;
    }
    public Button getbRight(){return bRight;}
    @Override
    public View[] getViews()
    {
        return new View[]{getbLeft(),getbRight()};


    }
}
