import { b as PendingApprovalView, m as ApprovalRequest } from "./approval-handler-runtime-types-DgzkXDnR.js";
import { r as ReplyPayload } from "./reply-payload-BXG75ffT.js";
import { r as ExecApprovalReplyDecision } from "./exec-approval-reply-2w-wZb5b.js";
import { d as shouldSuppressLocalNativeExecApprovalPrompt } from "./approval-native-helpers-jB0Uc6Pu.js";

//#region src/plugin-sdk/approval-reaction-runtime.d.ts
type ApprovalKind = "exec" | "plugin";
type KeyedStore<TValue> = {
  register(key: string, value: TValue, opts?: {
    ttlMs?: number;
  }): Promise<void>;
  lookup(key: string): Promise<TValue | undefined>;
  delete(key: string): Promise<boolean>;
};
type PersistedApprovalReactionTarget<TTarget> = {
  version: 1;
  target: TTarget;
};
type ApprovalReactionTargetStore<TTarget> = {
  register(key: string, target: TTarget, opts?: {
    ttlMs?: number;
  }): void;
  lookup(key: string): Promise<TTarget | null>;
  delete(key: string): void;
  clearForTest(): void;
};
type ApprovalReactionDecisionBinding = {
  decision: ExecApprovalReplyDecision;
  emoji: string;
  label: string;
};
type ApprovalReactionDecisionResolution = {
  decision: ExecApprovalReplyDecision;
  normalizedEmoji: string;
};
type ApprovalReactionTargetRecord<TRoute = unknown> = {
  approvalId: string;
  approvalKind?: ApprovalKind;
  allowedDecisions: readonly ExecApprovalReplyDecision[];
  route?: TRoute;
  expiresAtMs?: number;
};
type ApprovalReactionTargetResolution<TRoute = unknown> = ApprovalReactionDecisionResolution & {
  approvalId: string;
  approvalKind: ApprovalKind;
  route?: TRoute;
};
type ApprovalReactionPromptPayload = ReplyPayload & {
  allowedDecisions: readonly ExecApprovalReplyDecision[];
  reactionBindings: readonly ApprovalReactionDecisionBinding[];
};
type ApprovalReactionPendingContent = {
  reactionPayload: ApprovalReactionPromptPayload;
  manualFallbackPayload: ReplyPayload;
};
declare const APPROVAL_REACTION_BINDINGS: readonly [{
  readonly decision: "allow-once";
  readonly emoji: "👍";
  readonly label: "Allow Once";
}, {
  readonly decision: "allow-always";
  readonly emoji: "♾️";
  readonly label: "Allow Always";
}, {
  readonly decision: "deny";
  readonly emoji: "👎";
  readonly label: "Deny";
}];
declare function listApprovalReactionBindings(params: {
  allowedDecisions: readonly ExecApprovalReplyDecision[];
}): ApprovalReactionDecisionBinding[];
declare function buildApprovalReactionHint(params: {
  allowedDecisions: readonly ExecApprovalReplyDecision[];
}): string | null;
declare function normalizeApprovalReactionEmoji(reactionKey: string): string;
declare function resolveApprovalReactionDecision(params: {
  reactionKey: string;
  allowedDecisions: readonly ExecApprovalReplyDecision[];
}): ApprovalReactionDecisionResolution | null;
declare function resolveApprovalReactionTarget<TRoute = unknown>(params: {
  target: ApprovalReactionTargetRecord<TRoute> | null | undefined;
  reactionKey: string;
}): ApprovalReactionTargetResolution<TRoute> | null;
declare function buildApprovalPendingPromptPayload(params: {
  request: ApprovalRequest;
  view: PendingApprovalView;
  nowMs: number;
}): ApprovalReactionPromptPayload;
declare function buildApprovalReactionPromptPayloadForRequest(params: {
  request: ApprovalRequest;
  nowMs: number;
}): ApprovalReactionPromptPayload;
declare function buildApprovalReactionPendingContent(params: {
  request: ApprovalRequest;
  view: PendingApprovalView;
  nowMs: number;
}): ApprovalReactionPendingContent;
declare function buildApprovalReactionPendingContentForRequest(params: {
  request: ApprovalRequest;
  nowMs: number;
}): ApprovalReactionPendingContent;
declare function createApprovalReactionTargetStore<TTarget>(params: {
  namespace: string;
  maxEntries: number;
  defaultTtlMs: number;
  openStore?: (params: {
    namespace: string;
    maxEntries: number;
    defaultTtlMs: number;
  }) => KeyedStore<PersistedApprovalReactionTarget<TTarget>> | undefined;
  logPersistentError?: (error: unknown) => void;
  readPersistedTarget?: (target: unknown) => TTarget | null;
  nowMs?: () => number;
}): ApprovalReactionTargetStore<TTarget>;
//#endregion
export { APPROVAL_REACTION_BINDINGS, ApprovalReactionDecisionBinding, ApprovalReactionDecisionResolution, ApprovalReactionPendingContent, ApprovalReactionPromptPayload, ApprovalReactionTargetRecord, ApprovalReactionTargetResolution, ApprovalReactionTargetStore, buildApprovalPendingPromptPayload, buildApprovalReactionHint, buildApprovalReactionPendingContent, buildApprovalReactionPendingContentForRequest, buildApprovalReactionPromptPayloadForRequest, createApprovalReactionTargetStore, listApprovalReactionBindings, normalizeApprovalReactionEmoji, resolveApprovalReactionDecision, resolveApprovalReactionTarget, shouldSuppressLocalNativeExecApprovalPrompt };