# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations

-keep class com.microblink.camera.ui.R$* {
    *;
}

-keep class com.microblink.camera.ui.DynamicViewPort {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.CameraCharacteristics {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.CameraCharacteristics$Builder {
    public *;
    protected *;
}


-keep class com.microblink.camera.ui.CameraRecognizerOptions {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.CameraRecognizerContract {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.ScanCharacteristics {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.ScanCharacteristics$Builder {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.CameraRecognizerActivity {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.CameraRecognizerFragment {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.TooltipCharacteristics {
    public *;
    protected *;
}

-keep class com.microblink.camera.ui.TooltipCharacteristics$Builder {
    public *;
    protected *;
}

# Activation SDK is a compileOnly dependency. These classes may not be present
# at runtime if the host app does not include the Activation SDK. Suppress R8
# warnings for missing classes — all references are gated behind
# ActivationBridge.isActivationAvailable (Class.forName runtime check) in
# CameraRecognizerFragment, and ScanResultsContent is only class-loaded when
# the bridge confirms the SDK is present.
-dontwarn com.actualplatform.activation.**

# --- R8 full-mode safety for the activation post-scan flow ---
# ScanResultsContent is class-loaded only after ActivationBridge.available is
# true. Under R8 full mode this conditional dispatch can prune the class or
# its synthetic Compose entry points; keep the file-level Composable and its
# Kotlin synthetic accessors.
-keep class com.microblink.camera.ui.internal.ScanResultsContent {
    public <methods>;
}

# CameraRecognizerScreen is the public Composable entry point; its
# default-argument synthetics (e.g. `$default`) must survive full-mode
# shrinking so external callers that omit `activation` still link.
-keep class com.microblink.camera.ui.internal.CameraRecognizerScreen {
    public <methods>;
}

# RecognizerScanViewModelFactory exposes a default-argument constructor used
# by CameraRecognizerScreen; pin both the no-default and defaulted constructor.
-keep class com.microblink.camera.ui.internal.RecognizerScanViewModelFactory {
    <init>(...);
    public <methods>;
    public <fields>;
}