<!--
  ~ Copyright (c) 2023 to present Androidacy and contributors. Names, logos, icons, and the Androidacy name are all trademarks of Androidacy and may not be used without license. See LICENSE for more information.
  -->

<resources xmlns:tools="http://schemas.android.com/tools">

    <style name="Theme.MagiskModuleManager.Light" parent="Theme.Material3.Light">
        <item name="android:isLightTheme" tools:targetApi="q">true</item>
        <item name="isLightTheme">true</item>
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/indigo_200</item>
        <item name="colorPrimaryVariant">@color/white</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/blue_200</item>
        <item name="colorSecondaryVariant">@color/blue_200</item>
        <item name="colorOnSecondary">@color/white</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor">@color/status_bar_color</item>
        <item name="android:navigationBarColor">@color/transparent</item>
        <item name="android:windowLightStatusBar">true</item>
        <!-- Customize your theme here. -->
        <item name="android:windowActivityTransitions">true</item>
        <!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
        <item name="android:activityOpenExitAnimation">@*android:anim/slide_out_left</item>
        <item name="android:activityCloseEnterAnimation">@*android:anim/slide_in_left</item>
        <item name="android:activityCloseExitAnimation">@*android:anim/slide_out_right</item> -->
        <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
        <item name="android:windowExitAnimation">@android:anim/fade_out</item>
        <item name="colorBackgroundFloating">@color/light_colorBackgroundFloating</item>
        <item name="backgroundColor">@color/light_backgroundColor</item>
        <item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
        <item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="cornerRadius">@dimen/card_corner_radius</item>
        <!-- md3 theme for text input -->
        <item name="editTextStyle">@style/Widget.Material3.TextInputEditText.OutlinedBox</item>
        <item name="textInputStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
    </style>

    <style name="Theme.MagiskModuleManager.Transparent.Light" parent="Theme.Material3.Light">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:backgroundDimEnabled">true</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowAnimationStyle">@android:style/Animation</item>
        <item name="android:windowTranslucentStatus">false</item>
        <item name="android:statusBarColor">@color/status_bar_color</item>
        <item name="android:windowShowWallpaper">true</item>
        <!-- Fix text color in transparent theme -->
        <item name="android:textColor">@color/white</item>
        <item name="titleTextColor">@color/white</item>
        <!-- Fix action bar padding in transparent theme -->
        <item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
        <!-- Action bar -->
        <item name="actionBarStyle">@style/Theme.Design.NoActionBar</item>
        <item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="cornerRadius">@dimen/card_corner_radius</item>
        <item name="alertDialogTheme">@style/Theme.MagiskModuleManager.AlertDialog</item>
        <!-- md3 theme for text input -->
        <item name="editTextStyle">@style/Widget.Material3.TextInputEditText.OutlinedBox</item>
        <item name="textInputStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
    </style>

    <style name="Theme.MagiskModuleManager.Dark" parent="Theme.Material3.Dark">
        <item name="android:isLightTheme" tools:targetApi="q">false</item>
        <item name="isLightTheme">false</item>
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/indigo_200</item>
        <item name="colorPrimaryVariant">@color/black</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/blue_200</item>
        <item name="colorSecondaryVariant">@color/blue_200</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor">@color/status_bar_color</item>
        <item name="android:navigationBarColor">@color/transparent</item>
        <item name="android:windowLightStatusBar">false</item>
        <!-- Customize your theme here. -->
        <item name="android:windowActivityTransitions">true</item>
        <!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
        <item name="android:activityOpenExitAnimation">@*android:anim/slide_out_left</item>
        <item name="android:activityCloseEnterAnimation">@*android:anim/slide_in_left</item>
        <item name="android:activityCloseExitAnimation">@*android:anim/slide_out_right</item> -->
        <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
        <item name="android:windowExitAnimation">@android:anim/fade_out</item>
        <item name="colorBackgroundFloating">@color/dark_colorBackgroundFloating</item>
        <item name="backgroundColor">@color/dark_backgroundColor</item>
        <item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="cornerRadius">@dimen/card_corner_radius</item>
        <item name="alertDialogTheme">@style/Theme.MagiskModuleManager.AlertDialog</item>
        <!-- md3 theme for text input -->
        <item name="editTextStyle">@style/Widget.Material3.TextInputEditText.OutlinedBox</item>
        <item name="textInputStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
    </style>

    <!-- Black theme, which is just a dark theme with a black background -->
    <style name="Theme.MagiskModuleManager.Black" parent="Theme.MagiskModuleManager.Dark">
        <item name="colorBackgroundFloating">@color/gray_900</item>
        <item name="android:windowBackground">@color/black</item>
        <item name="boxBackgroundColor">@color/black</item>
        <item name="backgroundColor">@color/black</item>
        <item name="colorSurface">@color/black</item>
        <!-- Darker variants of the colors -->
        <item name="colorPrimary">@color/indigo_500</item>
        <item name="colorPrimaryVariant">@color/indigo_700</item>
        <item name="colorSecondary">@color/blue_500</item>
        <item name="colorSecondaryVariant">@color/blue_700</item>
        <item name="android:colorAccent">@color/blue_200</item>
        <item name="android:colorBackground">@color/black</item>
        <item name="android:colorForeground">@color/white</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <!-- chips should be dark, not black -->
        <item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
        <item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="cornerRadius">@dimen/card_corner_radius</item>
        <item name="alertDialogTheme">@style/Theme.MagiskModuleManager.AlertDialog</item>
        <!-- md3 theme for text input -->
        <item name="editTextStyle">@style/Widget.Material3.TextInputEditText.OutlinedBox</item>
        <item name="textInputStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
    </style>

    <!-- Base application theme. -->

    <style name="Theme.MagiskModuleManager" parent="Theme.MagiskModuleManager.Light" />

    <style name="Theme.MagiskModuleManager.NoActionBar" parent="Theme.MagiskModuleManager">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
    </style>


    <style name="Theme.MagiskModuleManager.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog.Centered">
        <item name="dialogCornerRadius">28dp</item>
        <item name="cornerFamily">rounded</item>
        <item name="android:colorBackground">?attr/colorSurface</item>
        <item name="android:layout" tools:ignore="PrivateResource">@layout/m3_alert_dialog</item>
    </style>
</resources>