package ca.canadapost.module.track.views;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.n;
import ca.canadapost.module.track.TrackActivity;
import ca.canadapost.module.track.views.CarbonNeutralShippingTrackFragment;
import kotlin.Metadata;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.v;
import n8.e0;
import rm.n0;

@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\n\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0016\u0010\u0017J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016J$\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0007\u001a\u00020\u00062\b\u0010\t\u001a\u0004\u0018\u00010\b2\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016J\u001a\u0010\r\u001a\u00020\u00042\u0006\u0010\f\u001a\u00020\n2\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016R\"\u0010\u0015\u001a\u00020\u000e8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b\u000f\u0010\u0010\u001a\u0004\b\u0011\u0010\u0012\"\u0004\b\u0013\u0010\u0014¨\u0006\u0018"}, d2 = {"Lca/canadapost/module/track/views/CarbonNeutralShippingTrackFragment;", "Lu8/b;", "Landroid/os/Bundle;", "savedInstanceState", "Lrm/n0;", "onCreate", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "Lzf/g;", "s", "Lzf/g;", "H", "()Lzf/g;", "J", "(Lzf/g;)V", "binding", "<init>", "()V", "track_productionRelease"}, k = 1, mv = {1, 9, 0})
/* loaded from: classes4.dex */
public final class CarbonNeutralShippingTrackFragment extends u8.b {

    /* renamed from: s, reason: collision with root package name and from kotlin metadata */
    public zf.g binding;

    /* loaded from: classes4.dex */
    static final class a extends v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ androidx.fragment.app.k f10901p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(androidx.fragment.app.k kVar) {
            super(1);
            this.f10901p = kVar;
        }

        public final void a(Toolbar setNavigationIcon) {
            t.g(setNavigationIcon, "$this$setNavigationIcon");
            setNavigationIcon.setNavigationIcon(yf.c.f52396e);
            setNavigationIcon.setNavigationContentDescription(this.f10901p.getString(yf.h.S0));
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((Toolbar) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void I(CarbonNeutralShippingTrackFragment this$0, View view) {
        t.g(this$0, "this$0");
        e0.a aVar = e0.f29852a;
        androidx.fragment.app.k requireActivity = this$0.requireActivity();
        t.f(requireActivity, "requireActivity(...)");
        String string = this$0.getString(yf.h.f52594j);
        t.f(string, "getString(...)");
        aVar.a(requireActivity, string);
    }

    public final zf.g H() {
        zf.g gVar = this.binding;
        if (gVar != null) {
            return gVar;
        }
        t.y("binding");
        return null;
    }

    public final void J(zf.g gVar) {
        t.g(gVar, "<set-?>");
        this.binding = gVar;
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
    }

    @Override // androidx.fragment.app.f
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        t.g(inflater, "inflater");
        n h10 = androidx.databinding.f.h(inflater, yf.e.f52506f, container, false);
        t.f(h10, "inflate(...)");
        J((zf.g) h10);
        H().O(getViewLifecycleOwner());
        androidx.fragment.app.k activity = getActivity();
        if (activity != null) {
            activity.setTitle(activity.getString(yf.h.f52599k));
            TrackActivity trackActivity = (TrackActivity) activity;
            trackActivity.q0(yf.c.f52400i, new a(activity));
            Toolbar m02 = trackActivity.m0();
            if (m02 != null) {
                m02.setNavigationContentDescription(activity.getString(yf.h.T0));
            }
        }
        View x10 = H().x();
        t.f(x10, "getRoot(...)");
        return x10;
    }

    @Override // u8.b, androidx.fragment.app.f
    public void onViewCreated(View view, Bundle bundle) {
        t.g(view, "view");
        H().A.setOnClickListener(new View.OnClickListener() { // from class: jg.a
            @Override // android.view.View.OnClickListener
            public final void onClick(View view2) {
                CarbonNeutralShippingTrackFragment.I(CarbonNeutralShippingTrackFragment.this, view2);
            }
        });
        w8.b.f40952a.d(requireActivity());
        super.onViewCreated(view, bundle);
    }
}
