package com.ustadmobile.port.android.view.ext;

import java.lang.System;

@kotlin.Metadata(mv = {1, 7, 1}, k = 2, d1 = {"\u0000L\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0000\u001aa\u0010\u0006\u001a\u00020\u0007\"\u0004\b\u0000\u0010\b*\u00020\t2\b\u0010\n\u001a\u0004\u0018\u0001H\b2\u0006\u0010\u000b\u001a\u00020\f2\f\u0010\r\u001a\b\u0012\u0004\u0012\u0002H\b0\u000e2\b\b\u0002\u0010\u000f\u001a\u00020\u00102\n\b\u0002\u0010\u0011\u001a\u0004\u0018\u00010\u00122\n\b\u0002\u0010\u0013\u001a\u0004\u0018\u00010\u00012\b\b\u0002\u0010\u0014\u001a\u00020\u0015\u00a2\u0006\u0002\u0010\u0016\u001aO\u0010\u0017\u001a\u00020\u0007*\u00020\t2\n\u0010\r\u001a\u0006\u0012\u0002\b\u00030\u000e2\u0006\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\u0018\u001a\u00020\u00152\b\b\u0002\u0010\u000f\u001a\u00020\u00102\n\b\u0002\u0010\u0011\u001a\u0004\u0018\u00010\u00122\n\b\u0002\u0010\u0013\u001a\u0004\u0018\u00010\u0001\u00a2\u0006\u0002\u0010\u0019\u001a5\u0010\u001a\u001a\u00020\u0007*\u00020\t2\u0006\u0010\u001b\u001a\u00020\u00102!\u0010\u001c\u001a\u001d\u0012\u0013\u0012\u00110\u0012\u00a2\u0006\f\b\u001e\u0012\b\b\u001f\u0012\u0004\b\b( \u0012\u0004\u0012\u00020\u00070\u001d\u001a\u0012\u0010!\u001a\u00020\u0007*\u00020\t2\u0006\u0010\"\u001a\u00020\u0010\u001a\u0016\u0010!\u001a\u00020\u0007*\u00020\t2\n\u0010\"\u001a\u0006\u0012\u0002\b\u00030#\"\u001b\u0010\u0000\u001a\u00020\u00018BX\u0082\u0084\u0002\u00a2\u0006\f\n\u0004\b\u0004\u0010\u0005\u001a\u0004\b\u0002\u0010\u0003\u00a8\u0006$"}, d2 = {"fragmentNavDefaultOptions", "Landroidx/navigation/NavOptions;", "getFragmentNavDefaultOptions", "()Landroidx/navigation/NavOptions;", "fragmentNavDefaultOptions$delegate", "Lkotlin/Lazy;", "navigateToEditEntity", "", "T", "Landroidx/fragment/app/Fragment;", "entity", "destinationId", "", "entityClass", "Ljava/lang/Class;", "destinationResultKey", "", "overwriteDestination", "", "navOptions", "argBundle", "Landroid/os/Bundle;", "(Landroidx/fragment/app/Fragment;Ljava/lang/Object;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Boolean;Landroidx/navigation/NavOptions;Landroid/os/Bundle;)V", "navigateToPickEntityFromList", "args", "(Landroidx/fragment/app/Fragment;Ljava/lang/Class;ILandroid/os/Bundle;Ljava/lang/String;Ljava/lang/Boolean;Landroidx/navigation/NavOptions;)V", "runAfterRequestingPermissionIfNeeded", "permission", "runAfterFun", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "granted", "saveResultToBackStackSavedStateHandle", "result", "", "app-android_release"})
public final class FragmentExtKt {
    private static final kotlin.Lazy fragmentNavDefaultOptions$delegate = null;
    
    /**
     * Save the result of a fragment (e.g. a selection from a list or newly created entity) to the
     * BackStack SavedStateHandle as specified by ARG_RESULT_DEST_ID and ARG_RESULT_DEST_KEY
     */
    public static final void saveResultToBackStackSavedStateHandle(@org.jetbrains.annotations.NotNull()
    androidx.fragment.app.Fragment $this$saveResultToBackStackSavedStateHandle, @org.jetbrains.annotations.NotNull()
    java.util.List<?> result) {
    }
    
    public static final void saveResultToBackStackSavedStateHandle(@org.jetbrains.annotations.NotNull()
    androidx.fragment.app.Fragment $this$saveResultToBackStackSavedStateHandle, @org.jetbrains.annotations.NotNull()
    java.lang.String result) {
    }
    
    private static final androidx.navigation.NavOptions getFragmentNavDefaultOptions() {
        return null;
    }
    
    /**
     * Navigate to an edit view and instruct the destination to save the result to the back stack
     *
     * @entity the entity to be edited (null to create a new entity)
     * @param entityClass The class for the entity type that is going to be selected
     * @param destinationId The destination id as per the navigation map
     * @param overwriteDestination If true, the ARG_RESULT_DEST_ID will be replaced with this fragment.
     *
     * This should normally be done when the user has gone through multiple edit screens e.g. when navigating
     * to holiday calendar edit from edit class and the back stack is as follows:
     * Person Edit - Class List - Edit Class - Holiday Calendar List - Holiday Calendar Edit
     * The result should be saved into the savedStateHandle for Edit Class, not Person Edit.
     *
     * By default this will be true when navigating from an edit fragment (the likely destination
     * of anything that is being picked), false otherwise (e.g. when the user went via a list screen)
     * @navOptions navOptions to pass to navController.navigate
     */
    public static final <T extends java.lang.Object>void navigateToEditEntity(@org.jetbrains.annotations.NotNull()
    androidx.fragment.app.Fragment $this$navigateToEditEntity, @org.jetbrains.annotations.Nullable()
    T entity, int destinationId, @org.jetbrains.annotations.NotNull()
    java.lang.Class<T> entityClass, @org.jetbrains.annotations.NotNull()
    java.lang.String destinationResultKey, @org.jetbrains.annotations.Nullable()
    java.lang.Boolean overwriteDestination, @org.jetbrains.annotations.Nullable()
    androidx.navigation.NavOptions navOptions, @org.jetbrains.annotations.NotNull()
    android.os.Bundle argBundle) {
    }
    
    /**
     * Navigate to a list view in picker mode for the given entity type and destination id
     *
     * @param entityClass The class for the entity type that is going to be selected
     * @param destinationId The destination id as per the navigation map
     * @param args optional additional args to pass to the list view
     * @param destinationResultKey the key to use in the SavedStateHandle
     */
    public static final void navigateToPickEntityFromList(@org.jetbrains.annotations.NotNull()
    androidx.fragment.app.Fragment $this$navigateToPickEntityFromList, @org.jetbrains.annotations.NotNull()
    java.lang.Class<?> entityClass, int destinationId, @org.jetbrains.annotations.NotNull()
    android.os.Bundle args, @org.jetbrains.annotations.NotNull()
    java.lang.String destinationResultKey, @org.jetbrains.annotations.Nullable()
    java.lang.Boolean overwriteDestination, @org.jetbrains.annotations.Nullable()
    androidx.navigation.NavOptions navOptions) {
    }
    
    /**
     * Extension function to request for the permission
     * @param permission Permission to be request
     * @param runAfterFun function to executed after permission is granted
     */
    public static final void runAfterRequestingPermissionIfNeeded(@org.jetbrains.annotations.NotNull()
    androidx.fragment.app.Fragment $this$runAfterRequestingPermissionIfNeeded, @org.jetbrains.annotations.NotNull()
    java.lang.String permission, @org.jetbrains.annotations.NotNull()
    kotlin.jvm.functions.Function1<? super java.lang.Boolean, kotlin.Unit> runAfterFun) {
    }
}