package trikita.anvil.support.core.ui;

import android.graphics.drawable.Drawable;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.PagerTitleStrip;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.ContentLoadingProgressBar;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.NestedScrollView;
import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.Space;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.View;
import java.lang.Boolean;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.lang.Void;
import trikita.anvil.Anvil;
import trikita.anvil.BaseDSL;

/**
 * DSL for creating views and settings their attributes.
 * This file has been generated by {@code gradle generateSupportCoreUiDSL}.
 * It contains views and their setters from the library support-core-ui.
 * Please, don't edit it manually unless for debugging.
 */
public final class SupportCoreUiDSL implements Anvil.AttributeSetter {
  static {
    Anvil.registerAttributeSetter(new SupportCoreUiDSL());
  }

  public static BaseDSL.ViewClassResult coordinatorLayout() {
    return BaseDSL.v(CoordinatorLayout.class);
  }

  public static Void coordinatorLayout(Anvil.Renderable r) {
    return BaseDSL.v(CoordinatorLayout.class, r);
  }

  public static BaseDSL.ViewClassResult pagerTabStrip() {
    return BaseDSL.v(PagerTabStrip.class);
  }

  public static Void pagerTabStrip(Anvil.Renderable r) {
    return BaseDSL.v(PagerTabStrip.class, r);
  }

  public static BaseDSL.ViewClassResult pagerTitleStrip() {
    return BaseDSL.v(PagerTitleStrip.class);
  }

  public static Void pagerTitleStrip(Anvil.Renderable r) {
    return BaseDSL.v(PagerTitleStrip.class, r);
  }

  public static BaseDSL.ViewClassResult viewPager() {
    return BaseDSL.v(ViewPager.class);
  }

  public static Void viewPager(Anvil.Renderable r) {
    return BaseDSL.v(ViewPager.class, r);
  }

  public static BaseDSL.ViewClassResult contentLoadingProgressBar() {
    return BaseDSL.v(ContentLoadingProgressBar.class);
  }

  public static Void contentLoadingProgressBar(Anvil.Renderable r) {
    return BaseDSL.v(ContentLoadingProgressBar.class, r);
  }

  public static BaseDSL.ViewClassResult drawerLayout() {
    return BaseDSL.v(DrawerLayout.class);
  }

  public static Void drawerLayout(Anvil.Renderable r) {
    return BaseDSL.v(DrawerLayout.class, r);
  }

  public static BaseDSL.ViewClassResult nestedScrollView() {
    return BaseDSL.v(NestedScrollView.class);
  }

  public static Void nestedScrollView(Anvil.Renderable r) {
    return BaseDSL.v(NestedScrollView.class, r);
  }

  public static BaseDSL.ViewClassResult slidingPaneLayout() {
    return BaseDSL.v(SlidingPaneLayout.class);
  }

  public static Void slidingPaneLayout(Anvil.Renderable r) {
    return BaseDSL.v(SlidingPaneLayout.class, r);
  }

  public static BaseDSL.ViewClassResult space() {
    return BaseDSL.v(Space.class);
  }

  public static Void space(Anvil.Renderable r) {
    return BaseDSL.v(Space.class, r);
  }

  public static BaseDSL.ViewClassResult swipeRefreshLayout() {
    return BaseDSL.v(SwipeRefreshLayout.class);
  }

  public static Void swipeRefreshLayout(Anvil.Renderable r) {
    return BaseDSL.v(SwipeRefreshLayout.class, r);
  }

  public static Void adapter(PagerAdapter arg) {
    return BaseDSL.attr("adapter", arg);
  }

  public static Void colorSchemeColors(int[] arg) {
    return BaseDSL.attr("colorSchemeColors", arg);
  }

  public static Void colorSchemeResources(int[] arg) {
    return BaseDSL.attr("colorSchemeResources", arg);
  }

  public static Void coveredFadeColor(int arg) {
    return BaseDSL.attr("coveredFadeColor", arg);
  }

  public static Void currentItem(int arg) {
    return BaseDSL.attr("currentItem", arg);
  }

  public static Void distanceToTriggerSync(int arg) {
    return BaseDSL.attr("distanceToTriggerSync", arg);
  }

  public static Void drawFullUnderline(boolean arg) {
    return BaseDSL.attr("drawFullUnderline", arg);
  }

  public static Void drawerElevation(float arg) {
    return BaseDSL.attr("drawerElevation", arg);
  }

  public static Void drawerLockMode(int arg) {
    return BaseDSL.attr("drawerLockMode", arg);
  }

  public static Void fillViewport(boolean arg) {
    return BaseDSL.attr("fillViewport", arg);
  }

  public static Void gravity(int arg) {
    return BaseDSL.attr("gravity", arg);
  }

  public static Void nonPrimaryAlpha(float arg) {
    return BaseDSL.attr("nonPrimaryAlpha", arg);
  }

  public static Void offscreenPageLimit(int arg) {
    return BaseDSL.attr("offscreenPageLimit", arg);
  }

  public static Void onChildScrollUpCallback(SwipeRefreshLayout.OnChildScrollUpCallback arg) {
    return BaseDSL.attr("onChildScrollUpCallback", arg);
  }

  public static Void onRefresh(SwipeRefreshLayout.OnRefreshListener arg) {
    return BaseDSL.attr("onRefresh", arg);
  }

  public static Void onScrollChange(NestedScrollView.OnScrollChangeListener arg) {
    return BaseDSL.attr("onScrollChange", arg);
  }

  public static Void pageMargin(int arg) {
    return BaseDSL.attr("pageMargin", arg);
  }

  public static Void pageMarginDrawable(Drawable arg) {
    return BaseDSL.attr("pageMarginDrawable", arg);
  }

  public static Void pageMarginDrawable(int arg) {
    return BaseDSL.attr("pageMarginDrawable", arg);
  }

  public static Void panelSlideListener(SlidingPaneLayout.PanelSlideListener arg) {
    return BaseDSL.attr("panelSlideListener", arg);
  }

  public static Void parallaxDistance(int arg) {
    return BaseDSL.attr("parallaxDistance", arg);
  }

  public static Void progressBackgroundColorSchemeColor(int arg) {
    return BaseDSL.attr("progressBackgroundColorSchemeColor", arg);
  }

  public static Void progressBackgroundColorSchemeResource(int arg) {
    return BaseDSL.attr("progressBackgroundColorSchemeResource", arg);
  }

  public static Void refreshing(boolean arg) {
    return BaseDSL.attr("refreshing", arg);
  }

  public static Void scrimColor(int arg) {
    return BaseDSL.attr("scrimColor", arg);
  }

  public static Void shadowDrawableLeft(Drawable arg) {
    return BaseDSL.attr("shadowDrawableLeft", arg);
  }

  public static Void shadowDrawableRight(Drawable arg) {
    return BaseDSL.attr("shadowDrawableRight", arg);
  }

  public static Void shadowResourceLeft(int arg) {
    return BaseDSL.attr("shadowResourceLeft", arg);
  }

  public static Void shadowResourceRight(int arg) {
    return BaseDSL.attr("shadowResourceRight", arg);
  }

  public static Void size(int arg) {
    return BaseDSL.attr("size", arg);
  }

  public static Void sliderFadeColor(int arg) {
    return BaseDSL.attr("sliderFadeColor", arg);
  }

  public static Void smoothScrollingEnabled(boolean arg) {
    return BaseDSL.attr("smoothScrollingEnabled", arg);
  }

  public static Void statusBarBackground(Drawable arg) {
    return BaseDSL.attr("statusBarBackground", arg);
  }

  public static Void statusBarBackground(int arg) {
    return BaseDSL.attr("statusBarBackground", arg);
  }

  public static Void statusBarBackgroundColor(int arg) {
    return BaseDSL.attr("statusBarBackgroundColor", arg);
  }

  public static Void statusBarBackgroundResource(int arg) {
    return BaseDSL.attr("statusBarBackgroundResource", arg);
  }

  public static Void tabIndicatorColor(int arg) {
    return BaseDSL.attr("tabIndicatorColor", arg);
  }

  public static Void tabIndicatorColorResource(int arg) {
    return BaseDSL.attr("tabIndicatorColorResource", arg);
  }

  public static Void textColor(int arg) {
    return BaseDSL.attr("textColor", arg);
  }

  public static Void textSpacing(int arg) {
    return BaseDSL.attr("textSpacing", arg);
  }

  public boolean set(View v, String name, final Object arg, final Object old) {
    switch (name) {
      case "adapter":
        if (v instanceof ViewPager && arg instanceof PagerAdapter) {
          ((ViewPager) v).setAdapter((PagerAdapter) arg);
          return true;
        }
        break;
      case "colorSchemeColors":
        if (v instanceof SwipeRefreshLayout && arg instanceof int[]) {
          ((SwipeRefreshLayout) v).setColorSchemeColors((int[]) arg);
          return true;
        }
        break;
      case "colorSchemeResources":
        if (v instanceof SwipeRefreshLayout && arg instanceof int[]) {
          ((SwipeRefreshLayout) v).setColorSchemeResources((int[]) arg);
          return true;
        }
        break;
      case "coveredFadeColor":
        if (v instanceof SlidingPaneLayout && arg instanceof Integer) {
          ((SlidingPaneLayout) v).setCoveredFadeColor((int) arg);
          return true;
        }
        break;
      case "currentItem":
        if (v instanceof ViewPager && arg instanceof Integer) {
          ((ViewPager) v).setCurrentItem((int) arg);
          return true;
        }
        break;
      case "distanceToTriggerSync":
        if (v instanceof SwipeRefreshLayout && arg instanceof Integer) {
          ((SwipeRefreshLayout) v).setDistanceToTriggerSync((int) arg);
          return true;
        }
        break;
      case "drawFullUnderline":
        if (v instanceof PagerTabStrip && arg instanceof Boolean) {
          ((PagerTabStrip) v).setDrawFullUnderline((boolean) arg);
          return true;
        }
        break;
      case "drawerElevation":
        if (v instanceof DrawerLayout && arg instanceof Float) {
          ((DrawerLayout) v).setDrawerElevation((float) arg);
          return true;
        }
        break;
      case "drawerLockMode":
        if (v instanceof DrawerLayout && arg instanceof Integer) {
          ((DrawerLayout) v).setDrawerLockMode((int) arg);
          return true;
        }
        break;
      case "fillViewport":
        if (v instanceof NestedScrollView && arg instanceof Boolean) {
          ((NestedScrollView) v).setFillViewport((boolean) arg);
          return true;
        }
        break;
      case "gravity":
        if (v instanceof PagerTitleStrip && arg instanceof Integer) {
          ((PagerTitleStrip) v).setGravity((int) arg);
          return true;
        }
        break;
      case "nonPrimaryAlpha":
        if (v instanceof PagerTitleStrip && arg instanceof Float) {
          ((PagerTitleStrip) v).setNonPrimaryAlpha((float) arg);
          return true;
        }
        break;
      case "offscreenPageLimit":
        if (v instanceof ViewPager && arg instanceof Integer) {
          ((ViewPager) v).setOffscreenPageLimit((int) arg);
          return true;
        }
        break;
      case "onChildScrollUpCallback":
        if (v instanceof SwipeRefreshLayout && arg instanceof SwipeRefreshLayout.OnChildScrollUpCallback) {
          ((SwipeRefreshLayout) v).setOnChildScrollUpCallback((SwipeRefreshLayout.OnChildScrollUpCallback) arg);
          return true;
        }
        break;
      case "onRefresh":
        if (v instanceof SwipeRefreshLayout && arg instanceof SwipeRefreshLayout.OnRefreshListener) {
          if (arg != null) {
            ((SwipeRefreshLayout) v).setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
              public void onRefresh() {
                ((SwipeRefreshLayout.OnRefreshListener) arg).onRefresh();
                Anvil.render();
              }
            });
          } else {
            ((SwipeRefreshLayout) v).setOnRefreshListener((SwipeRefreshLayout.OnRefreshListener) null);
          }
          return true;
        }
        break;
      case "onScrollChange":
        if (v instanceof NestedScrollView && arg instanceof NestedScrollView.OnScrollChangeListener) {
          if (arg != null) {
            ((NestedScrollView) v).setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
              public void onScrollChange(NestedScrollView a0, int a1, int a2, int a3, int a4) {
                ((NestedScrollView.OnScrollChangeListener) arg).onScrollChange(a0, a1, a2, a3, a4);
                Anvil.render();
              }
            });
          } else {
            ((NestedScrollView) v).setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) null);
          }
          return true;
        }
        break;
      case "pageMargin":
        if (v instanceof ViewPager && arg instanceof Integer) {
          ((ViewPager) v).setPageMargin((int) arg);
          return true;
        }
        break;
      case "pageMarginDrawable":
        if (v instanceof ViewPager && arg instanceof Drawable) {
          ((ViewPager) v).setPageMarginDrawable((Drawable) arg);
          return true;
        }
        if (v instanceof ViewPager && arg instanceof Integer) {
          ((ViewPager) v).setPageMarginDrawable((int) arg);
          return true;
        }
        break;
      case "panelSlideListener":
        if (v instanceof SlidingPaneLayout && arg instanceof SlidingPaneLayout.PanelSlideListener) {
          ((SlidingPaneLayout) v).setPanelSlideListener((SlidingPaneLayout.PanelSlideListener) arg);
          return true;
        }
        break;
      case "parallaxDistance":
        if (v instanceof SlidingPaneLayout && arg instanceof Integer) {
          ((SlidingPaneLayout) v).setParallaxDistance((int) arg);
          return true;
        }
        break;
      case "progressBackgroundColorSchemeColor":
        if (v instanceof SwipeRefreshLayout && arg instanceof Integer) {
          ((SwipeRefreshLayout) v).setProgressBackgroundColorSchemeColor((int) arg);
          return true;
        }
        break;
      case "progressBackgroundColorSchemeResource":
        if (v instanceof SwipeRefreshLayout && arg instanceof Integer) {
          ((SwipeRefreshLayout) v).setProgressBackgroundColorSchemeResource((int) arg);
          return true;
        }
        break;
      case "refreshing":
        if (v instanceof SwipeRefreshLayout && arg instanceof Boolean) {
          ((SwipeRefreshLayout) v).setRefreshing((boolean) arg);
          return true;
        }
        break;
      case "scrimColor":
        if (v instanceof DrawerLayout && arg instanceof Integer) {
          ((DrawerLayout) v).setScrimColor((int) arg);
          return true;
        }
        break;
      case "shadowDrawableLeft":
        if (v instanceof SlidingPaneLayout && arg instanceof Drawable) {
          ((SlidingPaneLayout) v).setShadowDrawableLeft((Drawable) arg);
          return true;
        }
        break;
      case "shadowDrawableRight":
        if (v instanceof SlidingPaneLayout && arg instanceof Drawable) {
          ((SlidingPaneLayout) v).setShadowDrawableRight((Drawable) arg);
          return true;
        }
        break;
      case "shadowResourceLeft":
        if (v instanceof SlidingPaneLayout && arg instanceof Integer) {
          ((SlidingPaneLayout) v).setShadowResourceLeft((int) arg);
          return true;
        }
        break;
      case "shadowResourceRight":
        if (v instanceof SlidingPaneLayout && arg instanceof Integer) {
          ((SlidingPaneLayout) v).setShadowResourceRight((int) arg);
          return true;
        }
        break;
      case "size":
        if (v instanceof SwipeRefreshLayout && arg instanceof Integer) {
          ((SwipeRefreshLayout) v).setSize((int) arg);
          return true;
        }
        break;
      case "sliderFadeColor":
        if (v instanceof SlidingPaneLayout && arg instanceof Integer) {
          ((SlidingPaneLayout) v).setSliderFadeColor((int) arg);
          return true;
        }
        break;
      case "smoothScrollingEnabled":
        if (v instanceof NestedScrollView && arg instanceof Boolean) {
          ((NestedScrollView) v).setSmoothScrollingEnabled((boolean) arg);
          return true;
        }
        break;
      case "statusBarBackground":
        if (v instanceof CoordinatorLayout && arg instanceof Drawable) {
          ((CoordinatorLayout) v).setStatusBarBackground((Drawable) arg);
          return true;
        }
        if (v instanceof DrawerLayout && arg instanceof Drawable) {
          ((DrawerLayout) v).setStatusBarBackground((Drawable) arg);
          return true;
        }
        if (v instanceof DrawerLayout && arg instanceof Integer) {
          ((DrawerLayout) v).setStatusBarBackground((int) arg);
          return true;
        }
        break;
      case "statusBarBackgroundColor":
        if (v instanceof CoordinatorLayout && arg instanceof Integer) {
          ((CoordinatorLayout) v).setStatusBarBackgroundColor((int) arg);
          return true;
        }
        if (v instanceof DrawerLayout && arg instanceof Integer) {
          ((DrawerLayout) v).setStatusBarBackgroundColor((int) arg);
          return true;
        }
        break;
      case "statusBarBackgroundResource":
        if (v instanceof CoordinatorLayout && arg instanceof Integer) {
          ((CoordinatorLayout) v).setStatusBarBackgroundResource((int) arg);
          return true;
        }
        break;
      case "tabIndicatorColor":
        if (v instanceof PagerTabStrip && arg instanceof Integer) {
          ((PagerTabStrip) v).setTabIndicatorColor((int) arg);
          return true;
        }
        break;
      case "tabIndicatorColorResource":
        if (v instanceof PagerTabStrip && arg instanceof Integer) {
          ((PagerTabStrip) v).setTabIndicatorColorResource((int) arg);
          return true;
        }
        break;
      case "textColor":
        if (v instanceof PagerTitleStrip && arg instanceof Integer) {
          ((PagerTitleStrip) v).setTextColor((int) arg);
          return true;
        }
        break;
      case "textSpacing":
        if (v instanceof PagerTitleStrip && arg instanceof Integer) {
          ((PagerTitleStrip) v).setTextSpacing((int) arg);
          return true;
        }
        break;
    }
    return false;
  }
}
