# ===== CHECKOUT ANDROID COMPONENTS SDK - CONSUMER PROGUARD RULES =====
# These rules ensure proper functionality when the SDK is consumed by merchant apps

# ===== CORE API INTERFACES =====
# Keep all public interfaces that merchants interact with
-keep public interface com.checkout.components.interfaces.api.* { *; }
-keep public interface com.checkout.components.interfaces.component.* { *; }

# ===== ERROR HANDLING =====
# Keep error classes that merchants receive in callbacks
-keep public enum com.checkout.components.interfaces.error.CheckoutErrorCode { *; }
-keep public class com.checkout.components.interfaces.error.CheckoutError { *; }
-keep public class com.checkout.components.interfaces.error.CheckoutError$* { *; }

# ===== DATA MODELS =====
# Keep all model classes used in public API (configurations, responses, etc.)
-keep public class com.checkout.components.interfaces.model.** { *; }

# ===== INTERNATIONALIZATION =====
# Localisation support - keep translation and locale handling classes
-keep public class com.checkout.components.interfaces.localisation.** { *; }

# ===== UI CUSTOMIZATION =====
# UI customisation - keep design tokens, themes, and styling classes
-keep public class com.checkout.components.interfaces.uicustomisation.** { *; }

# ===== ESSENTIAL ENUMS =====
# Core enums that merchants use for configuration and callbacks
-keep public enum com.checkout.components.interfaces.model.PaymentMethodName { *; }
-keep public enum com.checkout.components.interfaces.Environment { *; }
-keep public enum com.checkout.components.interfaces.component.PaymentButtonAction { *; }
-keep public enum com.checkout.components.interfaces.model.GooglePayResponseStatus { *; }

# ===== MAIN COMPONENT CLASSES =====
# Primary component classes that merchants instantiate and interact with
-keep public class com.checkout.components.card.CardComponent { *; }
-keep public class com.checkout.address.AddressComponent { *; }
-keep class com.checkout.address.ui.navigation.** { *; }
-keep public class com.checkout.address.model.** { *; }

-keep public class com.checkout.components.wallet** { *; }

-keep public class com.checkout.components.rememberme.CheckoutRememberMeFactory { *; }
-keep public class com.checkout.components.rememberme.CheckoutRememberMe { *; }
# Keep for serialization to avoid Serializer for class not found error
-keep,includedescriptorclasses class com.checkout.components.rememberme.model.**$$serializer { *; }
