# symplr Ads SDK consumer ProGuard / R8 rules.
#
# Applied to the publisher's app minifier when they depend on this SDK.
# Only rules that R8 can't infer from usage belong here — notably types
# instantiated via reflection (XML layout inflation).

# SymplrBannerAdView is inflated from XML via LayoutInflater, which
# reflects on the (Context, AttributeSet) / (Context, AttributeSet, int)
# constructors. Keep the class and those constructors — the rest of the
# class is referenced from app code and kept naturally by R8.
-keep public class de.symplr.ads.ad.SymplrBannerAdView {
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

# Sealed hierarchies used as public return / callback types (AdEvent,
# AdState, SymplrAdsError, SymplrAdSize). R8 keeps the concrete
# subclasses when application code references them, but downstream
# pattern matches on `is AdEvent.Failed` require the nested types to
# not be renamed — keep their public members.
-keep public class de.symplr.ads.ad.AdEvent { public *; }
-keep public class de.symplr.ads.ad.AdEvent$* { public *; }
-keep public class de.symplr.ads.ad.AdState { public *; }
-keep public class de.symplr.ads.ad.AdState$* { public *; }
-keep public class de.symplr.ads.SymplrAdsError { public *; }
-keep public class de.symplr.ads.SymplrAdsError$* { public *; }
-keep public class de.symplr.ads.ad.SymplrAdSize { public *; }
-keep public class de.symplr.ads.ad.SymplrAdSize$* { public *; }
