// Path: app/src/main/java/jp/yokomark/lgtm/app/compose/ui/ComposeActivity.java
// public class ComposeActivity extends DaggerActivity {
//     public static final String TAG = ComposeActivity.class.getSimpleName();
//     public static final String EXTRA_URI = BundleUtils.buildKey(ComposeActivity.class, "EXTRA_URI");
//     @Inject ComposeStateHolder mHolder;
//     @Inject ComposeViewHelper mHelper;
//     @Inject Bus mBus;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_compose);
//         mBus.register(this);
//         mHolder.onCreate(getIntent().<Uri>getParcelableExtra(EXTRA_URI), savedInstanceState);
//         mHelper.setUpActionBar();
//         mHelper.setUpComposeView(mHolder.getData());
//     }
// 
//     @Override
//     protected void onSaveInstanceState(@Nonnull Bundle outState) {
//         mHolder.onSaveInstanceState(outState);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     protected void onDestroy() {
//         mBus.unregister(this);
//         mHolder.onDestroy();
//         super.onDestroy();
//     }
// 
//     @Override
//     public boolean onCreateOptionsMenu(Menu menu) {
//         getMenuInflater().inflate(R.menu.options_activity_compose, menu);
//         return super.onCreateOptionsMenu(menu);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         ComposeOptionsMenu menu = ComposeOptionsMenu.valueOf(item);
//         return menu.getHandler().handle(this) || super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected List<Object> getModules() {
//         return Arrays.asList(new ActivityModule(this), new ComposeModule());
//     }
// 
//     @Subscribe
//     public void onSaveSuccess(SaveSuccessEvent event) {
//         mHelper.dismissProgress();
//         mHelper.dispatchShare(event.getUri());
//     }
// }
// 
// Path: app/src/main/java/jp/yokomark/lgtm/misc/ui/helper/OptionsMenuHandler.java
// public interface OptionsMenuHandler<A extends Activity> {
//     public boolean handle(A activity);
// }


import android.view.MenuItem;
import jp.yokomark.lgtm.R;
import jp.yokomark.lgtm.app.compose.ui.ComposeActivity;
import jp.yokomark.lgtm.misc.ui.helper.OptionsMenuHandler;
package jp.yokomark.lgtm.app.compose.ui.helper.options;



/**
 * @author yokomakukeishin
 * @version 1.0.0
 * @since 1.0.0
 */
public enum ComposeOptionsMenu {
    HOME(android.R.id.home, new HomeUpHandler()),
    SAVE(R.id.action_save, new SaveHandler()),
    UNKNOWN(-1, new UnknownMenuHandler());

    private final int mId;
    private final OptionsMenuHandler<ComposeActivity> mHandler;

// Path: app/src/main/java/jp/yokomark/lgtm/app/compose/ui/ComposeActivity.java
// public class ComposeActivity extends DaggerActivity {
//     public static final String TAG = ComposeActivity.class.getSimpleName();
//     public static final String EXTRA_URI = BundleUtils.buildKey(ComposeActivity.class, "EXTRA_URI");
//     @Inject ComposeStateHolder mHolder;
//     @Inject ComposeViewHelper mHelper;
//     @Inject Bus mBus;
// 
//     @Override
//     protected void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_compose);
//         mBus.register(this);
//         mHolder.onCreate(getIntent().<Uri>getParcelableExtra(EXTRA_URI), savedInstanceState);
//         mHelper.setUpActionBar();
//         mHelper.setUpComposeView(mHolder.getData());
//     }
// 
//     @Override
//     protected void onSaveInstanceState(@Nonnull Bundle outState) {
//         mHolder.onSaveInstanceState(outState);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     protected void onDestroy() {
//         mBus.unregister(this);
//         mHolder.onDestroy();
//         super.onDestroy();
//     }
// 
//     @Override
//     public boolean onCreateOptionsMenu(Menu menu) {
//         getMenuInflater().inflate(R.menu.options_activity_compose, menu);
//         return super.onCreateOptionsMenu(menu);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         ComposeOptionsMenu menu = ComposeOptionsMenu.valueOf(item);
//         return menu.getHandler().handle(this) || super.onOptionsItemSelected(item);
//     }
// 
//     @Override
//     protected List<Object> getModules() {
//         return Arrays.asList(new ActivityModule(this), new ComposeModule());
//     }
// 
//     @Subscribe
//     public void onSaveSuccess(SaveSuccessEvent event) {
//         mHelper.dismissProgress();
//         mHelper.dispatchShare(event.getUri());
//     }
// }
// 
// Path: app/src/main/java/jp/yokomark/lgtm/misc/ui/helper/OptionsMenuHandler.java
// public interface OptionsMenuHandler<A extends Activity> {
//     public boolean handle(A activity);
// }


// Path: app/src/main/java/jp/yokomark/lgtm/app/compose/ui/helper/options/ComposeOptionsMenu.java
import android.view.MenuItem;
import jp.yokomark.lgtm.R;
import jp.yokomark.lgtm.app.compose.ui.ComposeActivity;
import jp.yokomark.lgtm.misc.ui.helper.OptionsMenuHandler;

package jp.yokomark.lgtm.app.compose.ui.helper.options;



/**
 * @author yokomakukeishin
 * @version 1.0.0
 * @since 1.0.0
 */
public enum ComposeOptionsMenu {
    HOME(android.R.id.home, new HomeUpHandler()),
    SAVE(R.id.action_save, new SaveHandler()),
    UNKNOWN(-1, new UnknownMenuHandler());

    private final int mId;
    private final OptionsMenuHandler<ComposeActivity> mHandler;

    private ComposeOptionsMenu(int id, OptionsMenuHandler<ComposeActivity> handler) {