// Signature format: 4.0
package com.google.accompanist.themeadapter.appcompat {

  public final class AppCompatTheme {
    method @Deprecated @androidx.compose.runtime.Composable public static void AppCompatTheme(optional android.content.Context context, optional boolean readColors, optional boolean readTypography, optional androidx.compose.material.Shapes shapes, kotlin.jvm.functions.Function0<kotlin.Unit> content);
    method @Deprecated public static com.google.accompanist.themeadapter.appcompat.ThemeParameters createAppCompatTheme(android.content.Context, optional boolean readColors, optional boolean readTypography);
  }

  public final class ColorKt {
  }

  @Deprecated public final class ThemeParameters {
    ctor @Deprecated public ThemeParameters(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
    method @Deprecated public androidx.compose.material.Colors? component1();
    method @Deprecated public androidx.compose.material.Typography? component2();
    method @Deprecated public com.google.accompanist.themeadapter.appcompat.ThemeParameters copy(androidx.compose.material.Colors? colors, androidx.compose.material.Typography? typography);
    method @Deprecated public androidx.compose.material.Colors? getColors();
    method @Deprecated public androidx.compose.material.Typography? getTypography();
    property public final androidx.compose.material.Colors? colors;
    property public final androidx.compose.material.Typography? typography;
  }

}

