package com.ikea.kompis.extendedcontent;

import android.app.Dialog;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.text.SpannableString;
import android.text.style.StyleSpan;
import android.view.View.OnClickListener;
import com.ikea.kompis.util.UiUtil;
import com.ikea.publishingplatform.model.PublishingPlatformResponse;
import com.ikea.shared.analytics.UsageTracker;

public abstract class ECBaseCustomFontActivity extends FragmentActivity
{
  protected Dialog mCatalogueLoadingDialog;
  protected LoadingContentDialogFragment mLoadingContentDialogFragment;

  protected void dismisLoadingContentDialog()
  {
    if ((this.mLoadingContentDialogFragment != null) && (this.mLoadingContentDialogFragment.isShowing()))
      this.mLoadingContentDialogFragment.dismissDilaog();
  }

  protected void launchWebView(PublishingPlatformResponse paramPublishingPlatformResponse)
  {
    Intent localIntent = new Intent(this, ECWebViewActivity.class);
    localIntent.putExtra("extra_purchase_uri", paramPublishingPlatformResponse.getUrl());
    localIntent.putExtra("load_eccontent", true);
    startActivity(localIntent);
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
  }

  protected void onResume()
  {
    super.onResume();
    com.ikea.kompis.IkeaApplication.topActivty = getClass();
  }

  protected void showECContentLoadingDialog(LoadingDialogEvent paramLoadingDialogEvent)
  {
    if ((this.mLoadingContentDialogFragment != null) && (this.mLoadingContentDialogFragment.isShowing()))
      return;
    this.mLoadingContentDialogFragment = ((LoadingContentDialogFragment)getSupportFragmentManager().findFragmentByTag("dialog"));
    if (this.mLoadingContentDialogFragment == null)
      this.mLoadingContentDialogFragment = LoadingContentDialogFragment.newInstance();
    this.mLoadingContentDialogFragment.show(getSupportFragmentManager(), paramLoadingDialogEvent);
  }

  protected void showErrorMessage()
  {
    dismisLoadingContentDialog();
    showToastMessage(getString(2131165778));
  }

  protected void showToastMessage(String paramString)
  {
    SpannableString localSpannableString = new SpannableString(paramString);
    localSpannableString.setSpan(new StyleSpan(1), 0, paramString.length(), 33);
    UiUtil.showCustomToast(localSpannableString, this);
  }

  protected void showWrongStoreMessage()
  {
    String str1 = getResources().getString(2131165729);
    String str2 = getString(2131165592);
    UsageTracker.i().scanFailed(this, str1);
    WrongCountryMessageDialog localWrongCountryMessageDialog = new WrongCountryMessageDialog();
    Bundle localBundle = new Bundle();
    localBundle.putString("title", str1);
    localBundle.putString("message", "");
    localBundle.putString("primarybtn", str2);
    localBundle.putString("secondrybtn", "");
    localWrongCountryMessageDialog.setArguments(localBundle);
    localWrongCountryMessageDialog.show(getFragmentManager(), WrongCountryMessageDialog.class.getName(), true, null);
  }

  protected void showWrongStoreMessage(View.OnClickListener paramOnClickListener)
  {
    String str1 = getResources().getString(2131165729);
    String str2 = getString(2131165592);
    UsageTracker.i().scanFailed(this, str1);
    WrongCountryMessageDialog localWrongCountryMessageDialog = new WrongCountryMessageDialog();
    Bundle localBundle = new Bundle();
    localBundle.putString("title", str1);
    localBundle.putString("message", "");
    localBundle.putString("primarybtn", str2);
    localBundle.putString("secondrybtn", "");
    localWrongCountryMessageDialog.setArguments(localBundle);
    localWrongCountryMessageDialog.show(getFragmentManager(), WrongCountryMessageDialog.class.getName(), false, paramOnClickListener);
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.ikea.kompis.extendedcontent.ECBaseCustomFontActivity
 * JD-Core Version:    0.6.2
 */