package com.philliphsu.bottomsheetpickers.view.numberpad;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetDialog;
import android.view.View;

import com.philliphsu.bottomsheetpickers.R;

/**
 * Created by Phillip Hsu on 4/5/2017.
 */

public class BottomSheetNumberPadTimePickerDialog extends BottomSheetDialog
        implements INumberPadTimePicker.View {

    private final NumberPadTimePicker mTimePicker;
    private final View mOkButton;

    private final INumberPadTimePicker.Presenter mPresenter;

    public BottomSheetNumberPadTimePickerDialog(@NonNull Context context) {
        super(context);

        setContentView(R.layout.bsp_bottomsheet_numberpad_time_picker);
        mTimePicker = (NumberPadTimePicker) findViewById(R.id.bsp_numberpad_time_picker);
        mOkButton = findViewById(R.id.bsp_ok_button);
        mOkButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

        mPresenter = new NumberPadTimePickerDialogPresenter(this);
        mTimePicker.setOnBackspaceClickListener(new OnBackspaceClickHandler(mPresenter));
        mTimePicker.setOnNumberKeyClickListener(new OnNumberKeyClickListener(mPresenter));
    }

    @Override
    public void setNumberKeysEnabled(int start, int end) {

    }

    @Override
    public void setBackspaceEnabled(boolean enabled) {

    }

    @Override
    public void updateTimeDisplay(CharSequence time) {

    }

    @Override
    public void updateAmPmDisplay(CharSequence ampm) {

    }

    @Override
    public void setOkButtonEnabled(boolean enabled) {
        mOkButton.setEnabled(enabled);
    }

    @Override
    public void setAmPmDisplayVisible(boolean visible) {

    }

    @Override
    public void setAmPmDisplayIndex(int index) {

    }

    @Override
    public void setLeftAltKeyEnabled(boolean enabled) {

    }

    @Override
    public void setRightAltKeyEnabled(boolean enabled) {

    }

    @Override
    public void setHeaderDisplayFocused(boolean focused) {

    }

    @Override
    public void setLeftAltKeyText(CharSequence text) {

    }

    @Override
    public void setRightAltKeyText(CharSequence text) {

    }
}

@@ -382,56 +382,11 @@
 alog
-%0A        implements INumberPadTimePicker.View
  %7B%0A
+
 %0A   
@@ -472,70 +472,8 @@
 n;%0A%0A
-    private final INumberPadTimePicker.Presenter mPresenter;%0A%0A
     
@@ -723,32 +723,32 @@
 d_time_picker);%0A
+
         mOkButto
@@ -789,1409 +789,8 @@
 n);%0A
-        mOkButton.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                dismiss();%0A            %7D%0A        %7D);%0A%0A        mPresenter = new NumberPadTimePickerDialogPresenter(this);%0A        mTimePicker.setOnBackspaceClickListener(new OnBackspaceClickHandler(mPresenter));%0A        mTimePicker.setOnNumberKeyClickListener(new OnNumberKeyClickListener(mPresenter));%0A    %7D%0A%0A    @Override%0A    public void setNumberKeysEnabled(int start, int end) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setBackspaceEnabled(boolean enabled) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void updateTimeDisplay(CharSequence time) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void updateAmPmDisplay(CharSequence ampm) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setOkButtonEnabled(boolean enabled) %7B%0A        mOkButton.setEnabled(enabled);%0A    %7D%0A%0A    @Override%0A    public void setAmPmDisplayVisible(boolean visible) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setAmPmDisplayIndex(int index) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setLeftAltKeyEnabled(boolean enabled) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setRightAltKeyEnabled(boolean enabled) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setHeaderDisplayFocused(boolean focused) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setLeftAltKeyText(CharSequence text) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void setRightAltKeyText(CharSequence text) %7B%0A%0A
     

Decommission BottomSheetNumberPadTimePickerDialog.