# KYC Insight Android SDK — consumer ProGuard / R8 rules.
#
# Applied automatically to any app that depends on this AAR; consumers
# don't need to copy these into their own proguard-rules.pro.

# ── Public API surface ─────────────────────────────────────────────
# Keep every public type so reflective access (StateFlow.collect from
# Compose, ViewModel instantiation, kotlinx.serialization codecs)
# and Kotlin reflection see them intact.
-keep public class ng.netapps.kycinsight.** { public *; }
-keep public interface ng.netapps.kycinsight.** { *; }

# ── Kotlinx Serialization (used for GraphQL JSON parsing) ──────────
# Serializers are generated as nested classes; both must be kept.
-keepclassmembers,allowobfuscation class * {
    @kotlinx.serialization.Serializable <methods>;
}
-keepattributes InnerClasses
-keepattributes Signature
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
    static <1>$Companion Companion;
}
-if @kotlinx.serialization.Serializable class ** {
    static **$* *;
}
-keepclassmembers class <2>$<3> {
    kotlinx.serialization.KSerializer serializer(...);
}

# ── Compose Composable functions referenced reflectively ───────────
# (Material 3 + lifecycle-runtime-compose use reflection for
# previews / saver mechanisms.)
-keep @androidx.compose.runtime.Composable class * { *; }

# ── CameraX + ML Kit ──────────────────────────────────────────────
# Both ship their own consumer-rules; nothing extra needed beyond
# keeping the SDK's own public types above.

# ── OkHttp internals ──────────────────────────────────────────────
# Covered by OkHttp's own consumer-rules.pro shipped in the okhttp AAR.
