package com.nexlab.openclaw.node.service;

import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import androidx.core.content.ContextCompat;
import androidx.datastore.core.DataStore;
import androidx.datastore.preferences.core.Preferences;
import com.nexlab.openclaw.node.domain.model.PermissionAction;
import com.nexlab.openclaw.node.domain.model.PermissionDecision;
import com.nexlab.openclaw.node.domain.model.PermissionResult;
import dagger.hilt.android.qualifiers.ApplicationContext;
import kotlinx.coroutines.flow.Flow;
import javax.inject.Inject;
import javax.inject.Singleton;

@javax.inject.Singleton
@kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\"\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0007\u0018\u0000 $2\u00020\u0001:\u0001$B\u0011\b\u0007\u0012\b\b\u0001\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u0016\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u0007H\u0086@\u00a2\u0006\u0002\u0010\fJ\u0016\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u0010H\u0086@\u00a2\u0006\u0002\u0010\u0011J\u0012\u0010\u0012\u001a\u0004\u0018\u00010\u000e2\u0006\u0010\u000f\u001a\u00020\u0010H\u0002J\u000e\u0010\u0013\u001a\u00020\nH\u0086@\u00a2\u0006\u0002\u0010\u0014J\u0016\u0010\u0015\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u0007H\u0086@\u00a2\u0006\u0002\u0010\fJ&\u0010\u0016\u001a\u00020\n2\u0006\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u0018H\u0086@\u00a2\u0006\u0002\u0010\u001aJ\u0018\u0010\u001b\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u001e0\u001d0\u001cJ\u0012\u0010\u001f\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070\u00060\u001cJ\u0016\u0010 \u001a\u00020\u00182\u0006\u0010\u000b\u001a\u00020\u0007H\u0082@\u00a2\u0006\u0002\u0010\fJ\u0016\u0010!\u001a\u00020\u00182\u0006\u0010\u000b\u001a\u00020\u0007H\u0082@\u00a2\u0006\u0002\u0010\fJ\u0016\u0010\"\u001a\u00020\u00182\u0006\u0010\u000b\u001a\u00020\u0007H\u0082@\u00a2\u0006\u0002\u0010\fJ\u0016\u0010#\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u0007H\u0086@\u00a2\u0006\u0002\u0010\fR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006%"}, d2 = {"Lcom/nexlab/openclaw/node/service/PermissionManager;", "", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "defaultAllowlist", "", "", "highSensitivityActions", "addToAllowlist", "", "actionId", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "checkPermission", "Lcom/nexlab/openclaw/node/domain/model/PermissionResult;", "action", "Lcom/nexlab/openclaw/node/domain/model/PermissionAction;", "(Lcom/nexlab/openclaw/node/domain/model/PermissionAction;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "checkSystemPermission", "clearAllDecisions", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "clearDecision", "decide", "allowed", "", "rememberChoice", "(Lcom/nexlab/openclaw/node/domain/model/PermissionAction;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getAllDecisions", "Lkotlinx/coroutines/flow/Flow;", "", "Lcom/nexlab/openclaw/node/domain/model/PermissionDecision;", "getAllowlist", "isAllowed", "isDecisionRemembered", "isInAllowlist", "removeFromAllowlist", "Companion", "app_debug"})
public final class PermissionManager {
    @org.jetbrains.annotations.NotNull
    private final android.content.Context context = null;
    @org.jetbrains.annotations.NotNull
    private final java.util.Set<java.lang.String> defaultAllowlist = null;
    @org.jetbrains.annotations.NotNull
    private final java.util.Set<java.lang.String> highSensitivityActions = null;
    @org.jetbrains.annotations.NotNull
    public static final com.nexlab.openclaw.node.service.PermissionManager.Companion Companion = null;
    
    @javax.inject.Inject
    public PermissionManager(@dagger.hilt.android.qualifiers.ApplicationContext
    @org.jetbrains.annotations.NotNull
    android.content.Context context) {
        super();
    }
    
    /**
     * Check if an action is allowed
     * Returns the appropriate PermissionResult
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object checkPermission(@org.jetbrains.annotations.NotNull
    com.nexlab.openclaw.node.domain.model.PermissionAction action, @org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super com.nexlab.openclaw.node.domain.model.PermissionResult> $completion) {
        return null;
    }
    
    /**
     * Process a user's decision on a permission
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object decide(@org.jetbrains.annotations.NotNull
    com.nexlab.openclaw.node.domain.model.PermissionAction action, boolean allowed, boolean rememberChoice, @org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super kotlin.Unit> $completion) {
        return null;
    }
    
    /**
     * Clear a remembered decision
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object clearDecision(@org.jetbrains.annotations.NotNull
    java.lang.String actionId, @org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super kotlin.Unit> $completion) {
        return null;
    }
    
    /**
     * Clear all remembered decisions
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object clearAllDecisions(@org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super kotlin.Unit> $completion) {
        return null;
    }
    
    /**
     * Add action to allowlist (no confirmation needed)
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object addToAllowlist(@org.jetbrains.annotations.NotNull
    java.lang.String actionId, @org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super kotlin.Unit> $completion) {
        return null;
    }
    
    /**
     * Remove action from allowlist
     */
    @org.jetbrains.annotations.Nullable
    public final java.lang.Object removeFromAllowlist(@org.jetbrains.annotations.NotNull
    java.lang.String actionId, @org.jetbrains.annotations.NotNull
    kotlin.coroutines.Continuation<? super kotlin.Unit> $completion) {
        return null;
    }
    
    /**
     * Get all actions in allowlist
     */
    @org.jetbrains.annotations.NotNull
    public final kotlinx.coroutines.flow.Flow<java.util.Set<java.lang.String>> getAllowlist() {
        return null;
    }
    
    /**
     * Get all remembered decisions
     */
    @org.jetbrains.annotations.NotNull
    public final kotlinx.coroutines.flow.Flow<java.util.Map<java.lang.String, com.nexlab.openclaw.node.domain.model.PermissionDecision>> getAllDecisions() {
        return null;
    }
    
    private final java.lang.Object isDecisionRemembered(java.lang.String actionId, kotlin.coroutines.Continuation<? super java.lang.Boolean> $completion) {
        return null;
    }
    
    private final java.lang.Object isAllowed(java.lang.String actionId, kotlin.coroutines.Continuation<? super java.lang.Boolean> $completion) {
        return null;
    }
    
    private final java.lang.Object isInAllowlist(java.lang.String actionId, kotlin.coroutines.Continuation<? super java.lang.Boolean> $completion) {
        return null;
    }
    
    private final com.nexlab.openclaw.node.domain.model.PermissionResult checkSystemPermission(com.nexlab.openclaw.node.domain.model.PermissionAction action) {
        return null;
    }
    
    @kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002\u00a2\u0006\u0002\u0010\u0002J\u0016\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\u0006\u001a\u00020\u0007H\u0002J\u0016\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\u0006\u001a\u00020\u0007H\u0002\u00a8\u0006\t"}, d2 = {"Lcom/nexlab/openclaw/node/service/PermissionManager$Companion;", "", "()V", "allowedKey", "Landroidx/datastore/preferences/core/Preferences$Key;", "", "actionId", "", "rememberKey", "app_debug"})
    public static final class Companion {
        
        private Companion() {
            super();
        }
        
        private final androidx.datastore.preferences.core.Preferences.Key<java.lang.Boolean> rememberKey(java.lang.String actionId) {
            return null;
        }
        
        private final androidx.datastore.preferences.core.Preferences.Key<java.lang.Boolean> allowedKey(java.lang.String actionId) {
            return null;
        }
    }
}