package com.chinapnr.pos.pay.demo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.chinapnr.pos.pay.demo.trans.AuthActivity;
import com.chinapnr.pos.pay.demo.trans.AuthSaleActivity;
import com.chinapnr.pos.pay.demo.trans.AuthSaleVoidActivity;
import com.chinapnr.pos.pay.demo.trans.AuthVoidActivity;
import com.chinapnr.pos.pay.demo.trans.FlowerChokActivity;
import com.chinapnr.pos.pay.demo.trans.PayActivity;
import com.chinapnr.pos.pay.demo.trans.RefundActivity;
import com.chinapnr.pos.pay.demo.trans.VoidActivity;

public class TransActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_trans);
        findViewById(R.id.btn_pay).setOnClickListener(this);
        findViewById(R.id.btn_void).setOnClickListener(this);
        findViewById(R.id.btn_refund).setOnClickListener(this);
        findViewById(R.id.btn_flower_choking1).setOnClickListener(this);
        findViewById(R.id.btn_flower_choking2).setOnClickListener(this);
        findViewById(R.id.btn_auth).setOnClickListener(this);
        findViewById(R.id.btn_auth_void).setOnClickListener(this);
        findViewById(R.id.btn_auth_sale).setOnClickListener(this);
        findViewById(R.id.btn_auth_sale_void).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_pay:
                startActivity(new Intent(TransActivity.this, PayActivity.class));
                break;
            case R.id.btn_void:
                startActivity(new Intent(TransActivity.this, VoidActivity.class));
                break;
            case R.id.btn_refund:
                startActivity(new Intent(TransActivity.this, RefundActivity.class));
                break;
            case R.id.btn_flower_choking1:
                break;
            case R.id.btn_flower_choking2:
                startActivity(new Intent(TransActivity.this, FlowerChokActivity.class));
                break;
            case R.id.btn_auth:
                startActivity(new Intent(TransActivity.this, AuthActivity.class));
                break;
            case R.id.btn_auth_void:
                startActivity(new Intent(TransActivity.this, AuthVoidActivity.class));
                break;
            case R.id.btn_auth_sale:
                startActivity(new Intent(TransActivity.this, AuthSaleActivity.class));
                break;
            case R.id.btn_auth_sale_void:
                startActivity(new Intent(TransActivity.this, AuthSaleVoidActivity.class));
                break;
        }
    }
}