package re;

import androidx.lifecycle.a0;
import androidx.lifecycle.f0;
import androidx.lifecycle.g0;
import ca.canadapost.core.common.customView.h0;
import ca.canadapost.core.data.addresscomplete.webservice.AddressCompleteFindItem;
import kotlin.jvm.internal.t;

/* loaded from: classes4.dex */
public final class i extends ca.canadapost.module.addresscomplete.b {
    private final j7.c I;
    private final f0 J;
    private final a0 K;
    private final f0 L;
    private final a0 M;
    private final f0 N;
    private final a0 O;
    private final l8.g P;
    private final a0 Q;
    private final l8.g R;
    private final a0 S;
    private final g0 T;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public i(t7.c contextService, w8.q qVar, o9.c cVar, ca.a aVar, j7.c clipboardService, n9.a aVar2, w8.p pVar, a9.b bVar) {
        super(contextService, qVar, cVar, aVar, aVar2, pVar, bVar);
        t.g(contextService, "contextService");
        t.g(clipboardService, "clipboardService");
        this.I = clipboardService;
        f0 f0Var = new f0();
        this.J = f0Var;
        this.K = f0Var;
        Boolean bool = Boolean.FALSE;
        f0 f0Var2 = new f0(bool);
        this.L = f0Var2;
        this.M = f0Var2;
        f0 f0Var3 = new f0(bool);
        this.N = f0Var3;
        this.O = f0Var3;
        l8.g gVar = new l8.g();
        this.P = gVar;
        this.Q = gVar;
        l8.g gVar2 = new l8.g();
        this.R = gVar2;
        this.S = gVar2;
        g0 g0Var = new g0() { // from class: re.h
            @Override // androidx.lifecycle.g0
            public final void d(Object obj) {
                i.l0(i.this, (AddressCompleteFindItem.AddressCompleteRetrieveItem) obj);
            }
        };
        this.T = g0Var;
        f0Var.q(contextService.getString(q.f34680c));
        f0Var2.q(bool);
        f0Var3.q(bool);
        this.f8093i.k(g0Var);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void l0(i this$0, AddressCompleteFindItem.AddressCompleteRetrieveItem it) {
        t.g(this$0, "this$0");
        t.g(it, "it");
        this$0.P.s();
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // ca.canadapost.module.addresscomplete.b, androidx.lifecycle.z0
    public void O() {
        this.f8093i.o(this.T);
        super.O();
    }

    public final void k0() {
        l8.g gVar = this.R;
        AddressCompleteFindItem.AddressCompleteRetrieveItem addressCompleteRetrieveItem = (AddressCompleteFindItem.AddressCompleteRetrieveItem) this.f8093i.f();
        gVar.q(addressCompleteRetrieveItem != null ? addressCompleteRetrieveItem.Label : null);
    }

    public final void m0() {
        j7.c cVar = this.I;
        Object f10 = this.f8093i.f();
        t.d(f10);
        cVar.a("postalCode", ((AddressCompleteFindItem.AddressCompleteRetrieveItem) f10).PostalCode);
        o9.c cVar2 = this.f8098n;
        t7.c cVar3 = this.f8097m;
        h0.a(cVar2, cVar3, cVar3.getString(q.f34679b), -1);
    }

    public final a0 n0() {
        return this.S;
    }

    public final a0 o0() {
        return this.Q;
    }

    public final a0 p0() {
        return this.K;
    }

    public final a0 q0() {
        return this.M;
    }

    public final a0 r0() {
        return this.O;
    }

    public final void s0(boolean z10) {
        this.L.q(Boolean.valueOf(z10));
    }
}
